From b7acaf323f4ff25bd10c4b2abc0a79a313f770c7 Mon Sep 17 00:00:00 2001 From: MattiasOlla Date: Mon, 20 Apr 2026 10:36:39 +0200 Subject: [PATCH] Check against NPM instead of git tag when determining if we should release a new version --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b49210..fc2c13f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,8 +28,9 @@ jobs: - name: Check if package version changed id: check_version run: | + name="$(cat package.json | jq -r '.name')" version="v$(cat package.json | jq -r '.version')" - if [ $(git tag -l "$version") ]; then + if npm view "$name@$version" &> /dev/null; then echo "Tag $version already exists." else echo "version_tag=$version" >> "$GITHUB_OUTPUT" @@ -65,4 +66,4 @@ jobs: else # For pre-release versions, use the 'next' tag npm publish --access public --tag next - fi \ No newline at end of file + fi