File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish package
2+ on :
3+ release :
4+ types : [created]
5+
6+ jobs :
7+ publish :
8+ runs-on : ubuntu-latest
9+ environment : prod
10+ permissions :
11+ contents : read
12+ id-token : write
13+
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v6
17+
18+ - name : Setup Node.js
19+ uses : actions/setup-node@v6
20+ with :
21+ node-version : 24
22+ registry-url : https://registry.npmjs.org
23+
24+ - name : Version
25+ if : github.event_name == 'release' && github.event.action == 'created'
26+ run : |
27+ VERSION=${{ github.event.release.tag_name }}
28+ VERSION=${VERSION:1}
29+ CURRENT_VERSION=$(npm pkg get version | tr -d '"')
30+ if [ "$CURRENT_VERSION" != "$VERSION" ]; then
31+ npm version $VERSION --no-git-tag-version
32+ else
33+ echo "Version already set to $VERSION, skipping npm version command"
34+ fi
35+
36+ - name : publish
37+ run : |
38+ npm publish --access public
You can’t perform that action at this time.
0 commit comments