feat: migrate to the new oauth flow #56
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: CI/CD for VSCode Extension | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| git_check: | |
| uses: ./.github/workflows/git_check.yaml | |
| dprint_check: | |
| uses: ./.github/workflows/dprint_check.yaml | |
| package-and-publish-extension: | |
| needs: [git_check, dprint_check] | |
| name: Package and Publish VSCode Extension | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| cache: "pnpm" | |
| cache-dependency-path: "pnpm-lock.yaml" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install VSCE (CLI for managing VS Code extensions) | |
| run: pnpm install -g @vscode/vsce | |
| - name: Package Extension | |
| run: vsce package --no-dependencies | |
| - name: Publish Extension to VSCode Marketplace | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| run: vsce publish --no-dependencies --no-git-tag-version --no-update-package-json --pat $VSCE_PAT --skip-duplicate | |
| - name: Upload Release to GitHub | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: "*.vsix" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |