Bump vscode version to 0.2.1 #9
Workflow file for this run
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 VS Code Extension | |
| on: | |
| push: | |
| tags: | |
| - "vscode-v*" # VS Code extension-specific version tags | |
| workflow_dispatch: | |
| jobs: | |
| release_vscode: | |
| name: Publish VS Code Extension | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Wait for required checks | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const script = require('./.github/wait-for-checks.js'); | |
| await script({ github, context, core }); | |
| - name: Download TypeScript bindings from CI | |
| uses: dawidd6/action-download-artifact@v2 | |
| with: | |
| workflow: ci.yml | |
| workflow_conclusion: success | |
| name: typescript-bindings | |
| path: ${{ github.workspace }}/renamify-core/bindings | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| working-directory: renamify-vscode | |
| run: pnpm install | |
| - name: Verify version | |
| id: version | |
| run: | | |
| # Extract version from package.json | |
| VERSION=$(node -p "require('./renamify-vscode/package.json').version") | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| if [ "${{ github.event_name }}" = "push" ]; then | |
| # Verify tag matches package.json version | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| EXPECTED_TAG="vscode-v$VERSION" | |
| if [ "$TAG" != "$EXPECTED_TAG" ]; then | |
| echo "Error: Tag $TAG doesn't match expected $EXPECTED_TAG from package.json" | |
| exit 1 | |
| fi | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| else | |
| # Workflow dispatch - create tag from package.json version | |
| echo "tag=vscode-v$VERSION" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Package extension | |
| working-directory: renamify-vscode | |
| run: pnpm run package | |
| - name: Publish to VS Code Marketplace | |
| working-directory: renamify-vscode | |
| run: npx vsce publish --packagePath *.vsix -p ${{ secrets.VSCE_TOKEN }} | |
| - name: Publish to Open VSX | |
| working-directory: renamify-vscode | |
| run: npx ovsx publish *.vsix -p ${{ secrets.OPEN_VSX_TOKEN }} | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| ./scripts/generate-changelog.sh vscode "${{ steps.version.outputs.version }}" > changelog.md | |
| echo "## Installation" >> changelog.md | |
| echo "" >> changelog.md | |
| echo "Install from VS Code Marketplace or download the VSIX file below." >> changelog.md | |
| echo "" >> changelog.md | |
| echo "### From VS Code" >> changelog.md | |
| echo "- Open VS Code" >> changelog.md | |
| echo "- Go to Extensions (Ctrl+Shift+X)" >> changelog.md | |
| echo '- Search for "Renamify"' >> changelog.md | |
| echo "- Click Install" >> changelog.md | |
| echo "" >> changelog.md | |
| echo "### Manual VSIX Installation" >> changelog.md | |
| echo '```bash' >> changelog.md | |
| echo "code --install-extension renamify-*.vsix" >> changelog.md | |
| echo '```' >> changelog.md | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| if: github.event_name == 'push' | |
| with: | |
| tag_name: vscode-v${{ steps.version.outputs.version }} | |
| name: VS Code Extension v${{ steps.version.outputs.version }} | |
| files: renamify-vscode/*.vsix | |
| body_path: changelog.md | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |