Skip to content

Ensure compile_commands.json exists for clangd (#83) #28

Ensure compile_commands.json exists for clangd (#83)

Ensure compile_commands.json exists for clangd (#83) #28

Workflow file for this run

name: Build
on:
push:
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: environment-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Remove old files and folders
run: |
rm -rf package-lock.json
rm -rf dist
rm -rf *.vsix
- name: install node v20
uses: actions/setup-node@v6
with:
node-version: 20
- name: Install NPM
run: npm install
- name: Compile vsix package
run: |
npm run build
- name: Upload vsix artifact
uses: actions/upload-artifact@v7
with:
name: pioarduino-ide-vsix
path: "*.vsix"
publish:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download vsix artifact
uses: actions/download-artifact@v8
with:
name: pioarduino-ide-vsix
- name: install node v20
uses: actions/setup-node@v6
with:
node-version: 20
- name: Publish to VS Code Marketplace
run: npx @vscode/vsce publish --packagePath *.vsix -p ${{ secrets.VSCE_TOKEN }}
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}