From 37f13a0136bc57c8b4a1da458181db078b099570 Mon Sep 17 00:00:00 2001 From: Mattias Olla Date: Thu, 31 Oct 2024 15:46:35 +0100 Subject: [PATCH] Set NPM URL --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c61a1a..9ba0c4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 }}