File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - " v*"
7- - " !v*-*"
87
98permissions :
109 contents : write
11- id-token : write
1210
1311jobs :
14- publish :
12+ publish-npm :
1513 runs-on : ubuntu-latest
14+ environment : publish-npm
15+ permissions :
16+ contents : write
17+ id-token : write
1618 steps :
1719 - uses : actions/checkout@v4
1820
3941 run : npm pack --dry-run
4042
4143 - name : Publish package
42- run : npm publish --provenance --access public
44+ run : |
45+ if [[ "$GITHUB_REF_NAME" == *-* ]]; then
46+ npm_tag=next
47+ else
48+ npm_tag=latest
49+ fi
50+ npm publish --provenance --access public --tag "$npm_tag"
4351
4452 - name : Create GitHub release
53+ if : ${{ !contains(github.ref_name, '-') }}
4554 env :
4655 GH_TOKEN : ${{ github.token }}
4756 run : gh release create "${{ github.ref_name }}" --generate-notes
You can’t perform that action at this time.
0 commit comments