From 6532ada3064791b38f27dbc3ae0f204738d04064 Mon Sep 17 00:00:00 2001 From: "Dimitrios C. Michalakos" Date: Wed, 22 Oct 2025 12:42:09 +0300 Subject: [PATCH 1/2] chore: use OIDC to authenticate against the npm registry --- .github/workflows/ci.yml | 5 ++--- .github/workflows/release.yml | 7 ++++++- .nvmrc | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3250b8..e924364 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,8 +6,7 @@ on: jobs: block-autosquash: - # bypass the action if the PR is a draft - if: github.event.pull_request.draft == false + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }} name: block-autosquash runs-on: ubuntu-latest steps: @@ -78,7 +77,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - deno: ['v1.x'] + deno: ['v1.x', 'v2.x'] name: test:deno(${{ matrix.deno }}) steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6e1376..1c38ad5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,13 @@ on: branches: - main +permissions: + id-token: write # Required for OIDC + contents: read + jobs: release: + name: Release runs-on: ubuntu-latest steps: @@ -19,6 +24,7 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' + registry-url: 'https://registry.npmjs.org' - name: Install Dependencies run: npm ci @@ -30,4 +36,3 @@ jobs: commit: 'chore: version packages' env: GITHUB_TOKEN: ${{ secrets.CHANGESET_RELEASE_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.nvmrc b/.nvmrc index 9a2a0e2..a45fd52 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20 +24 From 00f2d28323e29f74d07dfaeb193c73adad03c9eb Mon Sep 17 00:00:00 2001 From: "Dimitrios C. Michalakos" Date: Wed, 22 Oct 2025 16:29:56 +0300 Subject: [PATCH 2/2] fix: issue with deno CI workflow --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e924364..b4b2133 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,7 @@ jobs: run: npm run test test-deno: + needs: build runs-on: ubuntu-latest strategy: matrix: @@ -82,6 +83,12 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: actions/cache@v4 + id: npm-cache + with: + path: '**/node_modules' + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json', '.nvmrc') }} + - uses: denoland/setup-deno@v1 with: deno-version: ${{ matrix.deno }}