File tree Expand file tree Collapse file tree 2 files changed +18
-57
lines changed
Expand file tree Collapse file tree 2 files changed +18
-57
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2121 - uses : actions/setup-node@v5
2222 with :
2323 node-version : 24
24- package-manager-cache : false
2524 registry-url : " https://registry.npmjs.org"
2625
2726 # Ensure npm 11.5.1 or later is installed:
3433 env :
3534 CI : true
3635
36+ - name : Determine type of release
37+ id : release-tag
38+ run : |
39+ if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
40+ echo "Publish latest"
41+ echo "tag=latest" >> $GITHUB_OUTPUT
42+ else
43+ echo "Publish nightly"
44+ echo "tag=nightly" >> $GITHUB_OUTPUT
45+ fi
46+
47+ - name : Bump version to prerelease
48+ if : github.ref != 'refs/heads/main'
49+ run : |
50+ PRERELEASE_TAG=nightly-$(echo "${{ github.ref_name }}" | sed -r 's/[^a-z0-9]+/-/gi')
51+ npm version prerelease --preid $PRERELEASE_TAG-$COMMIT_DATE-$GIT_HASH
52+
3753 - name : Generate types
3854 run : npm run generate-types
3955 env :
4561 CI : true
4662
4763 - name : Publish to NPM
48- run : npm publish --tag latest
64+ run : npm publish --tag ${{ steps.release-tag.outputs.tag }}
4965 env :
5066 CI : true
You can’t perform that action at this time.
0 commit comments