Skip to content

Commit da758cf

Browse files
committed
ci: harden prerelease publish job
- Proper job-level if expression using env var - Add concurrency to avoid overlapping publishes - Remove invalid vsce flag; pass version explicitly Refs: #97
1 parent e2119e3 commit da758cf

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,16 @@ jobs:
4444

4545
preview:
4646
name: preview prerelease (marketplace)
47-
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && secrets.VSCE_PAT != ''
47+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && env.VSCE_PAT != '' }}
4848
runs-on: ubuntu-22.04
4949
needs: [lint, test]
50+
concurrency:
51+
group: preview-marketplace
52+
cancel-in-progress: true
5053
permissions:
5154
contents: read
55+
env:
56+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
5257
steps:
5358
- uses: actions/checkout@v4
5459

@@ -66,6 +71,4 @@ jobs:
6671
echo "value=${BASE_VERSION}-pre.${GITHUB_RUN_NUMBER}.${SHORT_SHA}" >> $GITHUB_OUTPUT
6772
6873
- name: Publish prerelease to VS Code Marketplace
69-
env:
70-
VSCE_PAT: ${{ secrets.VSCE_PAT }}
71-
run: npx vsce publish --pre-release --no-git-tag-version ${{ steps.version.outputs.value }}
74+
run: npx vsce publish --pre-release ${{ steps.version.outputs.value }}

0 commit comments

Comments
 (0)