File tree Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 2323 - run : npm run lint
2424 - run : npm run build
2525 - run : npm test
26+
27+ release :
28+ if : startsWith(github.event.head_commit.message, 'release:')
29+ needs : build
30+ uses : ./.github/workflows/publish.yml
31+ with :
32+ release_type : ' release'
33+
34+ prerelease :
35+ if : startsWith(github.event.head_commit.message, 'prerelease:')
36+ needs : build
37+ uses : ./.github/workflows/publish.yml
38+ with :
39+ release_type : ' prerelease'
Original file line number Diff line number Diff line change 11name : Publish Package to npmjs
22on :
33 workflow_dispatch :
4+ inputs :
5+ release_type :
6+ description : ' Type of release (release or prerelease)'
7+ default : ' release'
8+ type : string
9+ workflow_call :
10+ inputs :
11+ release_type :
12+ default : ' release'
13+ type : string
414
515jobs :
616 build :
1626 node-version : ' 22.x'
1727 registry-url : ' https://registry.npmjs.org'
1828 # Install dependencies without modifying package-lock.json file
19- - run : npm ci
20- - run : npm run build
21- - run : npm publish ./dist
29+ - name : Install deps
30+ run : npm ci
31+
32+ - name : Build
33+ run : npm run build
34+
35+ - name : Publish
36+ if : ${{ inputs.release_type == 'release' }}
37+ run : npm publish ./dist
38+ env :
39+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
40+ NPM_CONFIG_PROVENANCE : true
41+
42+ - name : Publish Next
43+ if : ${{ inputs.release_type == 'prerelease' }}
44+ run : npm publish ./dist --tag next
2245 env :
2346 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
2447 NPM_CONFIG_PROVENANCE : true
You can’t perform that action at this time.
0 commit comments