File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Package to NPM
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ release_type :
6+ description : ' Version bump type'
7+ required : true
8+ default : ' patch'
9+ type : choice
10+ options :
11+ - patch
12+ - minor
13+ - major
14+ jobs :
15+ build :
16+ runs-on : ubuntu-latest
17+ permissions :
18+ contents : write
19+ id-token : write
20+ steps :
21+ - uses : actions/checkout@v5
22+ with :
23+ fetch-depth : 0
24+ - uses : actions/setup-node@v4
25+ with :
26+ node-version : ' 20.x'
27+ registry-url : ' https://registry.npmjs.org'
28+ - run : yarn install
29+ - run : yarn build
30+ - run : yarn build-browser
31+ - name : Configure git user
32+ run : |
33+ git config user.name "github-actions[bot]"
34+ git config user.email "github-actions[bot]@users.noreply.github.com"
35+ - name : Bump version
36+ id : bump
37+ run : |
38+ yarn lerna version ${{ github.event.inputs.release_type }} --no-push --no-git-tag-version --yes --no-private --force-publish
39+ NEW_VERSION=$(jq -r '.version' lerna.json)
40+ echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
41+ - name : Commit & tag release
42+ run : |
43+ git add lerna.json packages/*/package.json
44+ git commit -m "chore(release): v${{ steps.bump.outputs.version }}"
45+ git push origin HEAD
46+ - name : Create GitHub Release
47+ uses : softprops/action-gh-release@v2
48+ with :
49+ tag_name : v${{ steps.bump.outputs.version }}
50+ generate_release_notes : true
51+ draft : true
52+ - name : Publish packages to NPM
53+ run : yarn lerna exec npm publish
You can’t perform that action at this time.
0 commit comments