From 47384761febe7074ccafb2e46704f010385829ac Mon Sep 17 00:00:00 2001 From: Leo Ribeiro Date: Fri, 15 Mar 2024 17:37:07 -0400 Subject: [PATCH] Fix NPM Token Auth Issue (#449) * Fix NPM Token Auth Issue * Troubleshoot git status Signed-off-by: Frank Hinek * Disable pnpm publish git checks Signed-off-by: Frank Hinek --------- Signed-off-by: Frank Hinek Co-authored-by: Frank Hinek --- .github/workflows/alpha-npm.yml | 8 ++++++-- .github/workflows/release-npm.yml | 4 ++++ .gitignore | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/alpha-npm.yml b/.github/workflows/alpha-npm.yml index 6bd26dd50..fcf89e117 100644 --- a/.github/workflows/alpha-npm.yml +++ b/.github/workflows/alpha-npm.yml @@ -33,6 +33,10 @@ jobs: with: cache: "true" + - name: Store NPM Registry Settings to .npmrc + run: | + echo -e "//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}" > ~/.npmrc + # Note - this is not required but it gives a clean failure prior to attempting a release if # the GH workflow runner is not authenticated with NPMjs.com - name: Verify NPM token is authenticated with NPMjs.com @@ -55,14 +59,14 @@ jobs: - name: Build all workspace packages run: pnpm --recursive --stream build - + - name: Publish selected @web5/* packages env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} run: | for package in $PACKAGES; do cd packages/$package - pnpm publish --tag alpha --access public --provenance + pnpm publish --tag alpha --access public --provenance --no-git-checks cd ../.. done shell: bash diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index 038d583c3..60e9dc026 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -46,6 +46,10 @@ jobs: with: cache: "true" + - name: Store NPM Registry Settings to .npmrc + run: | + echo -e "//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}" > ~/.npmrc + - name: Install semver utility run: pnpm install -g semver@7.5.1 diff --git a/.gitignore b/.gitignore index 7722c51c7..4add76ec7 100644 --- a/.gitignore +++ b/.gitignore @@ -164,4 +164,7 @@ dist results.xml .tbdocs -temp \ No newline at end of file +temp + +# Hermit build output +.hermit