Build, test and publish extension #31
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, test and publish extension | |
on: | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies and update @flyde/* packages | |
working-directory: ./vscode-extension | |
run: | | |
./prepublish.sh | |
npm install | |
npm update --scope=@flyde\ | |
- name: Print flyde versions | |
working-directory: ./vscode-extension | |
run: | | |
cat node_modules/@flyde/core/package.json | jq -r '.version' | |
cat node_modules/@flyde/stdlib/package.json | jq -r '.version' | |
cat node_modules/@flyde/runtime/package.json | jq -r '.version' | |
cat node_modules/@flyde/resolver/package.json | jq -r '.version' | |
- name: Build extension | |
working-directory: ./vscode-extension | |
run: npm run build | |
- name: Test extension | |
working-directory: ./vscode-extension | |
run: xvfb-run -a npm run test | |
# - name: Bump minor version | |
# working-directory: ./vscode-extension | |
# run: | | |
# git config --global user.name "GitHub Actions" | |
# git config --global user.email "[email protected]" | |
# npm version minor -m "Bump version to %s" | |
# git commit -am "vscode: bumps versions" | |
# git push origin main | |
- name: Package and publish extension | |
working-directory: ./vscode-extension | |
env: | |
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} | |
run: | | |
npm install -g @vscode/vsce | |
vsce publish -p $VSCE_TOKEN |