Skip to content

Commit

Permalink
chore: authenticate with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Nov 18, 2024
1 parent 033f748 commit 251812d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline

- name: Authenticate with npm
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc

- name: Set git config
run: |
git config user.name $GIT_USER
Expand All @@ -67,11 +72,6 @@ jobs:
GPG_KEY: ${{ secrets.GPG_KEY }}
GIT_SIGNING_KEY: ${{ secrets.GIT_SIGNING_KEY }}

- name: Set pnpm config
run: pnpm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Set current pnpm package version
id: extract-version
run: |
Expand All @@ -98,11 +98,11 @@ jobs:
echo ${{ steps.extract-version.outputs.current-version }}
if echo ${{ steps.extract-version.outputs.current-version }} | grep -q "beta"; then
pnpm release --ci --preRelease
pnpm publish
npm run release -- --ci --preRelease
npm publish
else
pnpm release:patch --ci --preRelease=beta
pnpm publish
npm run release:patch -- --ci --preRelease=beta
npm publish
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

0 comments on commit 251812d

Please sign in to comment.