From 90283c249607295026959447368488321f4423c2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 23:39:27 +0000 Subject: [PATCH 1/3] Initial plan From 4113af7e5d1249a2648b145648959448006777b8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 23:42:32 +0000 Subject: [PATCH 2/3] Implement npm trusted publishing with actions/setup-node@v6 and npm@11.5.1 Co-authored-by: dmattia <8922077+dmattia@users.noreply.github.com> --- .github/workflows/ci.yml | 27 +++++++++++++++++---------- package.json | 2 +- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7406cfd..db21a7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/checkout@v2 # 'Install yarn v2 dependencies' - - uses: actions/setup-node@v3.1.1 + - uses: actions/setup-node@v6 with: node-version: '22.19.0' - run: npm install -g "yarn@1.22.5" @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} - uses: nick-fields/retry@v2 @@ -49,7 +49,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Use Node.js 22.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v6 with: node-version: 22.x - uses: nick-fields/retry@v2 @@ -68,7 +68,7 @@ jobs: fetch-depth: 100 # need the history to do a changed files check below (source, origin) - uses: actions/setup-python@v2 - name: Use Node.js 22.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v6 with: node-version: 22.x - uses: nick-fields/retry@v2 @@ -84,6 +84,10 @@ jobs: build-to-npm: if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + packages: write needs: - run-mocha - run-depcheck @@ -92,21 +96,24 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v6 with: node-version: '22.x' + # See: https://docs.npmjs.com/trusted-publishers + # See: https://github.com/actions/setup-node/issues/1445 + - name: Set npm to version that supports trusted publishers + run: npm install -g npm@11.5.1 + shell: bash - uses: nick-fields/retry@v2 with: timeout_minutes: 6 max_attempts: 3 retry_on: error command: yarn install --immutable - - name: Configure NPM authentication - run: | - yarn config set npmAlwaysAuth true - yarn config set npmAuthToken ${{ secrets.NPM_TOKEN }} - name: Publish to yarn/npm run: yarn npm publish + env: + NODE_AUTH_TOKEN: "" build-to-github-packages: if: github.ref == 'refs/heads/main' @@ -119,7 +126,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v6 with: node-version: '22.x' - uses: nick-fields/retry@v2 diff --git a/package.json b/package.json index 957f1f5..186ed74 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Transcend Inc.", "name": "@transcend-io/internationalization", "description": "Internationalization configuration for the monorepo", - "version": "2.3.0", + "version": "2.3.1", "homepage": "https://github.com/transcend-io/internationalization", "repository": { "type": "git", From 40422e133fcc3eec8cf69103e7d31b3c6037955d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Dec 2025 00:14:33 +0000 Subject: [PATCH 3/3] Fix prettier formatting - use single quotes for NODE_AUTH_TOKEN Co-authored-by: dmattia <8922077+dmattia@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db21a7d..7f2bbe6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,7 +113,7 @@ jobs: - name: Publish to yarn/npm run: yarn npm publish env: - NODE_AUTH_TOKEN: "" + NODE_AUTH_TOKEN: '' build-to-github-packages: if: github.ref == 'refs/heads/main'