-
Notifications
You must be signed in to change notification settings - Fork 97
68 lines (65 loc) · 2.56 KB
/
Copy pathnode.js.yml
File metadata and controls
68 lines (65 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Testers can build an installable VSIX from any branch on demand.
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Get extension version
id: version
run: echo "version=$(node -p 'require("./extension/package.json").version')" >> "$GITHUB_OUTPUT"
- run: git submodule init
- run: git submodule update
- run: npm ci --no-audit --legacy-peer-deps
- run: npm run build --if-present
- run: npm test
env:
TEST8BIT_GITHUB_TOKEN: ${{ secrets.TEST8BIT_GITHUB_TOKEN }}
- run: npm run test-verilog
- run: npm run buildpresets
- run: make distro
- name: Build and test VS Code extension
run: |
npm ci --no-audit --legacy-peer-deps --prefix extension
npm run typecheck --prefix extension
npm test --prefix extension
# Package the extension with the toolchain packs bundled, so testers can
# install it from the artifact with no other setup.
- name: Package VS Code extension
if: github.event_name != 'pull_request'
run: |
npm run package:release --prefix extension
mv extension/*.vsix "extension/8bitworkshop-vscode-${{ steps.version.outputs.version }}-${{ github.run_number }}.vsix"
# Upload the VSIX as-is; it is already an archive, so GitHub need not zip it again.
- name: Upload VS Code extension
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: 8bitworkshop-vscode-${{ steps.version.outputs.version }}-${{ github.run_number }}
path: extension/8bitworkshop-vscode-*.vsix
archive: false
if-no-files-found: error
retention-days: 30
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4.9.0
with:
branch: gh-pages
folder: tmp/dist