File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,18 +2,20 @@ name: Publish
22
33on :
44 push :
5- tags :
6- - " v* "
5+ branches :
6+ - main
77
88jobs :
99 publish :
1010 runs-on : ubuntu-latest
1111 permissions :
12- contents : read
13- id-token : write
12+ contents : write
13+ packages : write
1414
1515 steps :
1616 - uses : actions/checkout@v4
17+ with :
18+ token : ${{ secrets.GITHUB_TOKEN }}
1719
1820 - uses : pnpm/action-setup@v4
1921 with :
@@ -22,12 +24,23 @@ jobs:
2224 - uses : actions/setup-node@v4
2325 with :
2426 node-version : 22
25- registry-url : https://registry.npmjs.org
27+ registry-url : https://npm.pkg.github.com
28+ scope : " @medyll"
2629
2730 - name : Install dependencies
2831 run : pnpm install --frozen-lockfile
2932
33+ - name : Bump patch version
34+ run : |
35+ git config user.name "github-actions[bot]"
36+ git config user.email "github-actions[bot]@users.noreply.github.com"
37+ npm version patch --no-git-tag-version
38+ VERSION=$(node -p "require('./package.json').version")
39+ git add package.json
40+ git commit -m "chore: release v$VERSION [skip ci]"
41+ git push
42+
3043 - name : Publish
3144 run : pnpm publish --no-git-checks --access public
3245 env :
33- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
46+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments