From cdbc35075cea4adc498785944d8d84bd7ef1039c Mon Sep 17 00:00:00 2001 From: vitaligi <54726763+vitaligi@users.noreply.github.com> Date: Thu, 30 Apr 2026 17:20:09 +0300 Subject: [PATCH] ci: adjust publish for alpha release --- .github/workflows/publish.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8a36d91..cd43adc 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -25,8 +25,15 @@ jobs: - name: Publish to npm run: | echo "is pre-release: ${{ github.event.release.prerelease }}" - if [[ "${{ github.event.release.prerelease }}" == "true" ]] && [[ "${{ github.ref_name }}" == "${{ steps.package-info.outputs.version }}" ]]; then - echo "publishing prerelease with alpha tag" + echo "publish triggered on: ${{ github.ref_type }}" + if [[ "${{ github.ref_type }}" == "tag" ]] && + [[ "${{ github.event.release.prerelease }}" == "true" ]] && + [[ "${{ github.ref_name }}" == "${{ steps.package-info.outputs.version }}" ]]; then + echo "publishing prerelease with alpha tag from tag" + # npm publish --access public --tag alpha + elif [[ "${{ github.ref_type }}" == "branch" ]] && + [[ "${{ github.ref_name }}" == *"alpha"* ]]; then + echo "publishing prerelease with alpha tag from branch" # npm publish --access public --tag alpha else echo "publishing standard release"