fix: use canonical https repository URLs for npm provenance #17
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: CI | |
| # Remove default permissions of GITHUB_TOKEN for security | |
| # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | |
| permissions: {} | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: "Test: node-${{ matrix.node }}, ${{ matrix.os }}" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| node: [22, 24, 26] | |
| include: | |
| - os: windows-latest | |
| node: 22 | |
| - os: macos-latest | |
| node: 22 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0 | |
| - name: Set node version to ${{ matrix.node }} | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: pnpm | |
| - name: Install | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Preview Release | |
| if: matrix.os == 'ubuntu-latest' && matrix.node == 22 | |
| run: pnpx pkg-pr-new publish --compact --commentWithSha --no-template --pnpm './packages/*' | |
| - name: Format | |
| run: pnpm fmt --check | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Test | |
| run: pnpm test |