ci(workflows): create test workflow #9
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: publish-npm | |
| on: | |
| pull_request: | |
| permissions: | |
| id-token: write # OIDC for npm Trusted Publishing | |
| jobs: | |
| on-success: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup rust | |
| uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6 # stable | |
| - name: Build | |
| run: cargo install wasm-pack && wasm-pack build --release --target web --scope mdn | |
| - name: Setup Node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| registry-url: "https://registry.npmjs.org/" | |
| node-version-file: "./pkg/package.json" | |
| package-manager-cache: false | |
| # Ensure npm 11.5.1 or later for trusted publishing | |
| - name: Install latest npm | |
| run: sudo npm install -g npm@latest | |
| #- name: Publish | |
| # working-directory: ./pkg | |
| # run: npm publish --access public --provenance |