From 278ac729a76d23227cd110c73f2426365cb7134d Mon Sep 17 00:00:00 2001 From: Jean Burellier Date: Wed, 17 Dec 2025 19:56:50 +0100 Subject: [PATCH 1/2] chore(ci): npm-publish via reusable workflows --- .github/workflows/npm-publish.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..8bc47b4 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,14 @@ +name: Publish package to npm +on: + release: + types: [created] + +permissions: + id-token: write + contents: read + +jobs: + publish: + uses: expressjs/ci-workflows/.github/workflows/release.yml@main + secrets: + NPM_PUBLISH: ${{ secrets.NPM_PUBLISH }} From 6b07a45eeab59d83eaca4dfa2011b99f7773b789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulises=20Gasc=C3=B3n?= Date: Mon, 14 Sep 2026 16:59:07 +0200 Subject: [PATCH 2/2] ci: add npm publication workflow Port: https://github.com/expressjs/multer/blob/35979e5afbb814bdb4b750ce028b125eb84c53af/.github/workflows/npm-publish.yml --- .github/workflows/npm-publish.yml | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 8bc47b4..eb69f9d 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,14 +1,37 @@ name: Publish package to npm + on: release: types: [created] +concurrency: + group: "${{ github.workflow }} ✨ ${{ github.ref }}" + cancel-in-progress: false + permissions: - id-token: write contents: read jobs: publish: - uses: expressjs/ci-workflows/.github/workflows/release.yml@main - secrets: - NPM_PUBLISH: ${{ secrets.NPM_PUBLISH }} + name: Publish to npm + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: "lts/*" + registry-url: "https://registry.npmjs.org" + + # npm stage publish requires npm >= 11.15.0 + - name: Upgrade npm + run: npm install -g npm@latest + + - name: Stage publish to npm + run: npm stage publish