ci: update ci for npm provenance #18
Workflow file for this run
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: Release | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - closed | |
| env: | |
| EM_VERSION: 3.1.72 | |
| jobs: | |
| release: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| node-version: [24] | |
| permissions: | |
| contents: read | |
| id-token: write | |
| # release銉栥儵銉炽儊銇嬨倝main銇玃R銇屻優銉笺偢銇曘倢銇熴倝 | |
| if: | | |
| github.event.pull_request.merged == true | |
| && startsWith(github.head_ref, 'release/v') | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: ${{env.EM_VERSION}} | |
| - name: resolve git submodule | |
| run: git submodule update --init --recursive | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| version: 10 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "pnpm" | |
| registry-url: https://registry.npmjs.org | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build:all | |
| - name: Publish | |
| run: pnpm publish:all | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |