CD #15
This file contains hidden or 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: CD | |
| on: | |
| # push: | |
| # branches: | |
| # - main | |
| # allow manual triggers | |
| workflow_dispatch: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Pull & update submodules | |
| run: | | |
| git submodule update --init | |
| - name: EMSDK Version | |
| id: emsdk-version | |
| run: | | |
| echo "EMSDK_SHA=$(./submodules/emsdk/emsdk list | grep recommended | awk -F'[()]' '{print $2}')" >> $GITHUB_ENV | |
| - name: Cache EMSDK | |
| id: cache-emsdk | |
| uses: actions/cache@v3 | |
| with: | |
| path: submodules/emsdk | |
| key: ${{ runner.os }}-e-emsdk-${{ env.EMSDK_SHA }} | |
| restore-keys: | | |
| ${{ runner.os }}-e-emsdk- | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install deps | |
| run: npm ci | |
| - name: Update EMSDK | |
| if: steps.cache-emsdk.outputs.cache-hit != 'true' | |
| run: | | |
| npm run update:emsdk | |
| - name: Clean | |
| run: npm run clean | |
| - name: Build SEAL | |
| run: npm run build | |
| - name: Compile TS | |
| run: npm run compile | |
| - name: Bundle | |
| run: npm run test | |
| - name: Publish | |
| run: npm publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_GITHUB }} |