From d81952b0c0677107817226dcbade24ad8a494f30 Mon Sep 17 00:00:00 2001 From: Neal Date: Thu, 24 Oct 2024 11:24:08 -0700 Subject: [PATCH 1/2] add npm auth to url --- .github/workflows/release-kotlin.yml | 2 +- .github/workflows/release-typescript.yml | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-kotlin.yml b/.github/workflows/release-kotlin.yml index 50eb89c9..41b019c4 100644 --- a/.github/workflows/release-kotlin.yml +++ b/.github/workflows/release-kotlin.yml @@ -1,4 +1,4 @@ -name: Release +name: Release Kotlin on: workflow_dispatch: diff --git a/.github/workflows/release-typescript.yml b/.github/workflows/release-typescript.yml index 0942e5e7..056869a5 100644 --- a/.github/workflows/release-typescript.yml +++ b/.github/workflows/release-typescript.yml @@ -1,4 +1,4 @@ -name: Release TypeScript Package +name: Release TypeScript on: workflow_dispatch: @@ -51,6 +51,9 @@ jobs: name: Build and Publish TypeScript Package needs: set-version-and-tag runs-on: macos-latest + permissions: + contents: write + id-token: write steps: # Check out the code at the release tag - uses: actions/checkout@v4 @@ -84,6 +87,15 @@ jobs: npm run test:node:cjs npm run test:node:esm + - name: Setup npm auth + run: | + echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc + + - name: Verify npm authentication + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm whoami + # Publish to npm - name: Publish to npm env: From e9ce53f2a472ec753d3825c33cdf03ee1415d09d Mon Sep 17 00:00:00 2001 From: Neal Date: Thu, 24 Oct 2024 11:50:25 -0700 Subject: [PATCH 2/2] update --- .github/workflows/release-typescript.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-typescript.yml b/.github/workflows/release-typescript.yml index 056869a5..780e98f6 100644 --- a/.github/workflows/release-typescript.yml +++ b/.github/workflows/release-typescript.yml @@ -89,7 +89,7 @@ jobs: - name: Setup npm auth run: | - echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc - name: Verify npm authentication env: