Merge pull request #10 from raspberrypi/cmake-tools-compatibility #35
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: Build .vsix release asset | |
on: push | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Enable corepack | |
run: corepack enable | |
- name: Setup node v18 | |
uses: actions/setup-node@v4 | |
with: | |
# the current node version use in vscode | |
node-version: '18' | |
cache: 'yarn' | |
- name: Install Dependencies | |
run: | | |
npm i -g @vscode/vsce | |
yarn | |
- name: Package Extension | |
run: | | |
yarn lint | |
vsce package --pre-release | |
- name: Test PAT | |
env: | |
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_PAT }} | |
run: | | |
vsce verify-pat raspberry-pi | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: raspberry-pi-pico | |
path: raspberry-pi-pico-*.vsix | |
- name: Add Release Asset | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: raspberry-pi-pico-*.vsix | |
- name: Publish Extension | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_PAT }} | |
run: | | |
vsce publish --pre-release -i raspberry-pi-pico-*.vsix |