Skip to content

Commit

Permalink
Merge pull request #14 from primer/add-npmrc-to-release
Browse files Browse the repository at this point in the history
Add NPMRC to GHPR Release
  • Loading branch information
JoshBowdenConcepts committed Mar 23, 2023
2 parents de56b14 + 3e2de38 commit 63a4948
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -15,6 +15,10 @@ on:
type: number
required: false
default: 16
use_gpr:
type: boolean
required: false
default: false
secrets:
gh_token:
required: true
Expand Down Expand Up @@ -42,6 +46,16 @@ jobs:
- name: Install dependencies
run: ${{ inputs.install }}

- name: Create .npmrc
if: ${{ inputs.use_gpr }}
run: |
cat << EOF > "$HOME/.npmrc"
//npm.pkg.github.com/:_authToken=$NPM_TOKEN
EOF
env:
use_gpr: ${{ inputs.use_gpr }}
NPM_TOKEN: ${{ secrets.npm_token }}

- name: Create release pull request or publish to npm
id: changesets
# Uses SHA for security hardening
Expand Down

0 comments on commit 63a4948

Please sign in to comment.