## [1.2.1] - 2025-08-15 #17
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
| # This is a basic workflow to help you get started with Actions | |
| name: Publish FpcToolKit | |
| # Controls when the workflow will run | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Install the dependencies | |
| run: npm i | |
| - name: Install vsce | |
| run: npm i -g vsce | |
| - name: Install esbuild | |
| run: npm i -g esbuild | |
| - name: Build with esbuild | |
| run: esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node | |
| # | |
| # Package and Upload Extension | |
| # | |
| # NOTE: | |
| # The "vscode:prepublish" script in package.json will be executed to compile the extension | |
| # prior to packaging. | |
| # | |
| - name: Package Extension into .vsix file | |
| id: asset | |
| shell: bash | |
| run: | | |
| vsce package | |
| echo "vsix_path=$(ls *.vsix)" >> $GITHUB_OUTPUT | |
| - name: Delete existing release (if exists) | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| RELEASE_ID=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
| "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG_NAME" \ | |
| | jq -r '.id // empty') | |
| if [ ! -z "$RELEASE_ID" ]; then | |
| echo "Deleting existing release with ID: $RELEASE_ID" | |
| curl -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
| "https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID" | |
| else | |
| echo "No existing release found for tag: $TAG_NAME" | |
| fi | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| release_name: Release ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| - name: Upload .vsix file to Github as release asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ${{ steps.asset.outputs.vsix_path }} | |
| asset_name: ${{ steps.asset.outputs.vsix_path }} | |
| asset_content_type: application/zip | |
| - name: Publish | |
| run: vsce publish -p ${{ secrets.VSCE_PAT }} | |