Skip to content

Commit

Permalink
fix: npm publish registry-url (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppvg authored Apr 3, 2024
1 parent 0af457f commit 58ba7bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
name: Setup
description: 'Setup Node.js and pnpm and install dependencies'
description: "Setup Node.js and pnpm and install dependencies"

inputs:
registry-url:
required: false
description: "Registry URL to setup up for auth. Passed on to actions/setup-node."
default: ""

runs:
using: 'composite'
using: "composite"
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
registry-url: ${{ inputs.registry-url }}

- name: Setup pnpm
uses: pnpm/action-setup@v3
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
registry-url: "https://registry.npmjs.org"
- name: Get semver from tag
run: |
RELEASE_VERSION=${GITHUB_REF#refs/*/}
Expand All @@ -32,6 +34,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
registry-url: "https://npm.pkg.github.com"
- name: Get semver from tag
run: |
RELEASE_VERSION=${GITHUB_REF#refs/*/}
Expand Down

0 comments on commit 58ba7bc

Please sign in to comment.