Release VSCE Extension #16
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 VSCE Extension | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| release-vsce: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| - name: Install vsce globally | |
| run: npm install --global @vscode/vsce | |
| - name: Install Dependencies & Package Extension | |
| run: | | |
| npm install | |
| vsce package | |
| - name: Publish to VS Code Marketplace | |
| run: vsce publish -p $VSCE_TOKEN | |
| env: | |
| VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} | |
| - name: Install ovsx CLI | |
| run: npm install -g ovsx | |
| - name: Publish to OpenVSX | |
| run: ovsx publish *.vsix --pat $OVSX_TOKEN | |
| env: | |
| OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }} | |
| - name: Get Extension Version | |
| id: get_version | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| echo "version=v$VERSION" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release with VSIX Asset | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create "${{ steps.get_version.outputs.version }}" \ | |
| --title "VS Code Extension Release ${{ steps.get_version.outputs.version }}" \ | |
| --notes "VS Code Extension Release ${{ steps.get_version.outputs.version }} | |
| This release was created automatically after publishing to VS Code Marketplace. | |
| ## Changes | |
| - Extension published to marketplace | |
| - VSIX file attached for manual installation" \ | |
| *.vsix |