Skip to content

Commit

Permalink
Set NPM URL
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasOlla committed Oct 31, 2024
1 parent 9841817 commit 37f13a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ jobs:
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true

- name: Check if package version changed
id: check_version
run: |
version="v$(cat package.json | jq -r '.version')"
echo Version: $version
git tag
if [ $(git tag -l "$version") ]; then
echo "Tag $version already exists."
else
Expand All @@ -60,6 +64,7 @@ jobs:
with:
node-version-file: .nvmrc
cache: npm
registry-url: "https://registry.npmjs.org"

- name: Create GitHub release
if: steps.check_version.outputs.version_tag
Expand All @@ -72,6 +77,6 @@ jobs:
if: steps.check_version.outputs.version_tag
run: |
npm ci
npm publish --access public
npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 37f13a0

Please sign in to comment.