From 724303e7874bc73be5f4d0d4c72602f3b29105c3 Mon Sep 17 00:00:00 2001 From: nitro-neal <5314059+nitro-neal@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:42:38 -0500 Subject: [PATCH] add npm auth to url (#144) --- .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: