diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7406cfd..7f2bbe6 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",