File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1616 - name : Determine Version
1717 id : version
1818 run : |
19- VERSION=${GITHUB_REF#refs/heads/}
19+ # Fetch all tags
20+ git fetch --tags
21+
22+ # Get the latest tag
23+ LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
24+
25+ # Append '-beta' to the latest tag
26+ VERSION="${LATEST_TAG}-beta"
27+
28+ # Export the version and npm tag
2029 echo "VERSION=$VERSION" >> $GITHUB_ENV
2130 echo "NPM_TAG=beta" >> $GITHUB_ENV
2231
Original file line number Diff line number Diff line change 4040
4141 - name : Publish with pnpm
4242 if : ${{ github.ref_name != 'main'}}
43- run : pnpm publish --access public --tag beta --no-git-checks
43+ run : pnpm publish --access public --tag branch --no-git-checks
4444 env :
4545 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments