From 6e7d910ffc0d800d47d9a30f0e3ca6267ef313da Mon Sep 17 00:00:00 2001 From: Robin Date: Sat, 8 Nov 2025 10:19:04 -0600 Subject: [PATCH 1/2] publish pre-release --- .github/workflows/publish.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6e2beb2..9817094 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -49,7 +49,21 @@ jobs: cache: yarn - name: Install dependencies run: yarn install --frozen-lockfile + - name: Determine release type + id: release_type + run: | + VERSION=$(node -p "require('./package.json').version") + echo "Version: $VERSION" + MINOR=$(echo $VERSION | cut -d. -f2) + echo "Minor: $MINOR" + if [ $((MINOR % 2)) -eq 1 ]; then + echo "Publishing as pre-release" + echo "prerelease_flag=--pre-release" >> $GITHUB_OUTPUT + else + echo "Publishing as stable release" + echo "prerelease_flag=" >> $GITHUB_OUTPUT + fi - name: Package extension run: npx vsce package --yarn - name: Publish to VSCode Marketplace - run: npx vsce publish --yarn -p ${{ secrets.VSCE_PAT }} + run: npx vsce publish --yarn ${{ steps.release_type.outputs.prerelease_flag }} -p ${{ secrets.VSCE_PAT }} From dc67e4e6d5ad328e2d00909ad03e16c287575101 Mon Sep 17 00:00:00 2001 From: Robin Date: Sat, 8 Nov 2025 10:21:54 -0600 Subject: [PATCH 2/2] narrow to version tags --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 9817094..e22d6de 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,7 +3,7 @@ name: Publish Extension on: push: tags: - - "*" + - "v[0-9]+.[0-9]+.[0-9]+" jobs: test: