Skip to content

Commit

Permalink
Fix NPM Token Auth Issue (#449)
Browse files Browse the repository at this point in the history
* Fix NPM Token Auth Issue

* Troubleshoot git status

Signed-off-by: Frank Hinek <[email protected]>

* Disable pnpm publish git checks

Signed-off-by: Frank Hinek <[email protected]>

---------

Signed-off-by: Frank Hinek <[email protected]>
Co-authored-by: Frank Hinek <[email protected]>
  • Loading branch information
leordev and frankhinek authored Mar 15, 2024
1 parent c2359ee commit 4eb80e5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/alpha-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 4 additions & 0 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]

Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,7 @@ dist
results.xml

.tbdocs
temp
temp

# Hermit build output
.hermit

0 comments on commit 4eb80e5

Please sign in to comment.