From a5541df5ec242006e61395d8274123b4748f1efa Mon Sep 17 00:00:00 2001 From: Sander Declerck Date: Mon, 6 Apr 2026 15:08:23 +0200 Subject: [PATCH] Fix pre-release publishing --- .github/workflows/build-and-release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 772b928..7cd2a91 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -137,5 +137,11 @@ jobs: - name: Publish to npm run: | - echo "Publishing version ${{ github.event.release.tag_name }} to NPM" - npm publish --workspace=packages/safe-chain --access public --provenance + VERSION="${{ github.event.release.tag_name }}" + echo "Publishing version $VERSION to NPM" + if [[ "$VERSION" == *"-"* ]]; then + PRERELEASE_TAG=$(echo "$VERSION" | sed 's/.*-\([^-]*\)$/\1/') + npm publish --workspace=packages/safe-chain --access public --provenance --tag "$PRERELEASE_TAG" + else + npm publish --workspace=packages/safe-chain --access public --provenance + fi