I am an idiot #8
This file contains 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: Publish VS Code Extension | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'vscode-extension/package.json' | |
- '.github/workflows/' | |
jobs: | |
publish-extension: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22.x' | |
registry-url: 'https://registry.npmjs.org' | |
# Build and publish VS Code extension | |
- name: Install dependencies | |
run: cd ./vscode-extension && npm clean-install | |
- name: Build extension | |
run: cd ./vscode-extension && npm run build | |
- name: Publish to VS Code Marketplace | |
run: cd ./vscode-extension && npx vsce publish -p ${{ secrets.VSCE_PAT }} |