ci(workflows): create test workflow #1
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: NPM Publish simulation | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| 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: npm install -g npm@latest | |
| - name: Publish (dry-run) | |
| working-directory: ./pkg | |
| run: npm publish --dry-run --access public --provenance |