Skip to content

Commit

Permalink
Merge pull request #127 from PeculiarVentures/ci-publish
Browse files Browse the repository at this point in the history
Update repo-init action to use NPM token
  • Loading branch information
microshine authored Jan 7, 2025
2 parents f1d3a52 + 7267dc2 commit 3ba90b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/actions/repo-init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: repo-init
description: Prepares the repository
inputs:
token:
description: GitHub token
description: NPM token
required: true

runs:
Expand All @@ -19,13 +19,13 @@ runs:
run: |
npm set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ inputs.token }}

- name: Ensure access
shell: bash
run: npm whoami --registry https://registry.npmjs.org/
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ inputs.token }}

- name: Config git user
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preprelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Initialize the repository
uses: ./.github/actions/repo-init
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Build
run: npm run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Initialize the repository
uses: ./.github/actions/repo-init
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Build
run: npm run build
Expand Down

0 comments on commit 3ba90b2

Please sign in to comment.