File tree Expand file tree Collapse file tree 2 files changed +15
-27
lines changed
Expand file tree Collapse file tree 2 files changed +15
-27
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,16 +2,22 @@ name: Release
22on :
33 push :
44 branches : [main]
5+ workflow_dispatch :
6+
57jobs :
68 release :
79 runs-on : ubuntu-latest
810 permissions :
9- id-token : write # Required for trusted publishing via OIDC (https://docs.npmjs.com/trusted-publishers)
10- if : " contains(github.event.head_commit.message, 'chore(release): publish')"
11+ id-token : write
12+ # Only gate push events by commit message; allow workflow_dispatch always
13+ if : >
14+ github.event_name == 'workflow_dispatch' ||
15+ (github.event_name == 'push' && contains(github.event.head_commit.message, 'chore(release): publish'))
1116 steps :
1217 - uses : actions/checkout@v4
1318 with :
1419 fetch-depth : 0
20+
1521 - uses : actions/setup-node@v4
1622 with :
1723 node-version : lts/*
2228 - name : Build
2329 run : yarn build
2430
25- - name : Publish to NPM
31+ # Choose publish command based on the event type
32+ - name : Publish to NPM (push)
33+ if : github.event_name == 'push'
2634 run : npm run release:publish
35+
36+ - name : Publish to NPM (manual)
37+ if : github.event_name == 'workflow_dispatch'
38+ run : npm run release:publish-manual
You can’t perform that action at this time.
0 commit comments