VSCode Release #4
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: VSCode Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| release_type: | |
| description: "Type of version to release" | |
| required: true | |
| type: choice | |
| options: | |
| - major | |
| - minor | |
| - patch | |
| env: | |
| PACKAGE_NAME: taiga-theme.vsix | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| VERSION: ${{ steps.set_version.outputs.VERSION }} | |
| env: | |
| VSCE_PAT: ${{ secrets.ACCESS_TOKEN }} | |
| OVSX_PAT: ${{ secrets.OPEN_VSX_PAT }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup git config | |
| run: | | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Use Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install Deps | |
| run: | | |
| pnpm install | |
| cd packages/vscode | |
| pnpm install | |
| - name: Package extension | |
| working-directory: packages/vscode | |
| run: | | |
| pnpm run package ${{ github.event.inputs.release_type }} | |
| git push | |
| - name: Publish to VSCode Marketplace | |
| working-directory: packages/vscode | |
| run: pnpm run publish:vsce | |
| - name: Publish to Open VSX Registry | |
| working-directory: packages/vscode | |
| run: pnpm run publish:ovsx | |
| - name: Set version output | |
| working-directory: packages/vscode | |
| id: set_version | |
| run: echo "VERSION=v$(npm pkg get version | tr -d \")" >> "$GITHUB_OUTPUT" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} | |
| path: packages/vscode/${{ env.PACKAGE_NAME }} | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: publish | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} | |
| - name: Create release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| OWNER: ${{ github.repository_owner }} | |
| REPO: ${{ github.event.repository.name }} | |
| VERSION: ${{ needs.publish.outputs.VERSION }} | |
| run: gh release create "VSCode $VERSION" $PACKAGE_NAME --generate-notes |