File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 1414
1515jobs :
1616 set-publish-version :
17- # Run only on main branch
18- # if: github.ref == 'refs/heads/main'
17+ # Run on any branch (allows nightly releases from any branch)
1918 runs-on : ubuntu-latest
2019 steps :
2120 - name : Checkout code
@@ -24,21 +23,21 @@ jobs:
2423 uses : actions/setup-node@v4
2524 - name : Set publish version
2625 id : set-publish-version
27- if : github.event.inputs.tag == 'nightly'
2826 run : |
29- if [ "${{ github.event.inputs.tag }}" == "nightly" ]; then
30- CURRENT_VERSION=$(npm pkg get version | tr -d '"')
27+ CURRENT_VERSION=$(npm pkg get version | tr -d '"')
28+ TAG="${{ github.event.inputs.tag || 'nightly' }}"
29+ # For nightly tag, append commit SHA to version
30+ if [ "$TAG" == "nightly" ]; then
3131 NIGHTLY_VERSION="${CURRENT_VERSION}-nightly-${GITHUB_SHA::7}"
3232 echo "VERSION=${NIGHTLY_VERSION}" >> $GITHUB_OUTPUT
3333 else
34- echo "VERSION=$(npm pkg get version | tr -d '"') " >> $GITHUB_OUTPUT
34+ echo "VERSION=${CURRENT_VERSION} " >> $GITHUB_OUTPUT
3535 fi
3636 outputs :
3737 VERSION : ${{ steps.set-publish-version.outputs.VERSION }}
3838
3939 publish-npm :
40- # Run only on main branch
41- # if: github.ref == 'refs/heads/main'
40+ # Run on any branch (allows nightly releases from any branch)
4241 uses : ./.github/workflows/reusable-sdk-npm.yml
4342 needs : set-publish-version
4443 with :
You can’t perform that action at this time.
0 commit comments