From d36b9ff70c9d9a513c72ba3baf6ae024df1e618b Mon Sep 17 00:00:00 2001 From: Francesco Pira Date: Wed, 18 Nov 2026 18:58:45 +0100 Subject: [PATCH 1/2] ci: fix release publishing after OIDC npmjs requirement --- .github/workflows/release.yml | 9 ++++----- .nvmrc | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec127d1..7cd85b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Clone repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set .nvmrc content to stage output id: nvmrc @@ -21,10 +21,11 @@ jobs: echo "node_version=$(cat .nvmrc | sed 's/v//g')" >> $GITHUB_OUTPUT - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: ${{ steps.nvmrc.outputs.node_version }} registry-url: 'https://registry.npmjs.org' + package-manager-cache: false - name: Install dependencies run: npm ci @@ -55,6 +56,4 @@ jobs: # publish to npm after docker image is built and pushed. # this to avoid publishing to npm registry before a possible docker image build failure - name: Publish to npm - run: npm publish --provenance --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + run: npm publish --access public diff --git a/.nvmrc b/.nvmrc index bb52a16..22fbfc0 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.18.2 +v24.22.3 From c080c3bc070b1107b7a6ac00b61f349d4d96427b Mon Sep 17 00:00:00 2001 From: Francesco Pira Date: Wed, 18 Nov 2026 18:59:24 +0100 Subject: [PATCH 2/2] ci: update release pipeline to also create releases --- .github/workflows/release.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7cd85b4..c62478e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,14 +1,15 @@ name: Publish to npm.js on: - release: - types: [published] + push: + tags: + - '*.*.*' jobs: publish: runs-on: ubuntu-22.04 permissions: - contents: read + contents: write id-token: write steps: @@ -48,11 +49,19 @@ jobs: uses: docker/build-push-action@v6 with: push: true - tags: ${{ github.repository }}:latest,${{ github.repository }}:${{ github.event.release.tag_name }} + tags: ${{ github.repository }}:latest,${{ github.repository }}:${{ github.ref_name }} context: . file: Dockerfile platforms: linux/amd64,linux/arm64 + - name: Create GitHub Release + env: + GH_TOKEN: ${{ github.token }} + run: | + if ! gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then + gh release create "$GITHUB_REF_NAME" --verify-tag --generate-notes + fi + # publish to npm after docker image is built and pushed. # this to avoid publishing to npm registry before a possible docker image build failure - name: Publish to npm