bump version #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 'release/**' | |
| jobs: | |
| package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify version matches branch | |
| env: | |
| BRANCH: ${{ github.ref_name }} | |
| run: | | |
| TAG="${BRANCH##*/}" | |
| PKG_VERSION=$(node -p "require('./package.json').version") | |
| if [ "$TAG" != "$PKG_VERSION" ]; then | |
| echo "package.json version ($PKG_VERSION) does not match branch tag ($TAG)"; exit 1; | |
| fi | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - run: npm ci | |
| - run: npm run compile | |
| - name: Package VSIX | |
| run: npx @vscode/vsce package -o extension.vsix | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vsix | |
| path: extension.vsix | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: [package] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: vsix | |
| path: . | |
| - name: Publish to VS Code Marketplace | |
| run: npx @vscode/vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ./extension.vsix |