Skip to content

Commit 8729cd2

Browse files
fix(ci): set default nightly tag for npm publish workflow
1 parent c70bbea commit 8729cd2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/sdk-publish-npm.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,23 @@ jobs:
2929
CURRENT_VERSION=$(npm pkg get version | tr -d '"')
3030
NIGHTLY_VERSION="${CURRENT_VERSION}-nightly-${GITHUB_SHA::7}"
3131
echo "VERSION=${NIGHTLY_VERSION}" >> $GITHUB_OUTPUT
32+
# Set default tag to 'nightly' if not provided
33+
TAG="${{ github.event.inputs.tag }}"
34+
if [ -z "$TAG" ]; then
35+
TAG="nightly"
36+
fi
37+
echo "TAG=${TAG}" >> $GITHUB_OUTPUT
3238
outputs:
3339
VERSION: ${{ steps.set-staging-version.outputs.VERSION }}
40+
TAG: ${{ steps.set-staging-version.outputs.TAG }}
3441

3542
publish-npm-staging:
3643
# Run for manual dispatch on any branch (nightly releases)
3744
if: ${{ github.event_name == 'workflow_dispatch' }}
3845
uses: ./.github/workflows/reusable-npm.yml
3946
needs: set-staging-version
4047
with:
41-
tag: ${{ github.event.inputs.tag }}
48+
tag: ${{ needs.set-staging-version.outputs.TAG }}
4249
version: ${{ needs.set-staging-version.outputs.VERSION }}
4350

4451
publish-npm-latest:

0 commit comments

Comments
 (0)