# 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' - 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 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 --prefix extension - name: Upload VS Code extension if: github.event_name != 'pull_request' uses: actions/upload-artifact@v4 with: name: 8bitworkshop-vscode-${{ github.run_number }} path: extension/*.vsix 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