File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 publish :
1313 runs-on : ubuntu-latest
1414 permissions :
15- contents : read
15+ contents : write
1616 steps :
1717 - uses : actions/checkout@v4
18+ with :
19+ token : ${{ secrets.GITHUB_TOKEN }}
1820
1921 - uses : pnpm/action-setup@v4
2022 with :
@@ -31,18 +33,17 @@ jobs:
3133
3234 - run : pnpm build
3335
34- - name : Check if version already published
35- id : version-check
36+ - name : Bump patch version
3637 run : |
37- LOCAL_VERSION=$(node -p "require('./package.json').version")
38- if npm view @recoupable/cli@$LOCAL_VERSION version 2>/dev/null; then
39- echo "published=true" >> $GITHUB_OUTPUT
40- else
41- echo "published=false" >> $GITHUB_OUTPUT
42- fi
38+ git config user.name "github-actions[bot]"
39+ git config user.email "github-actions[bot]@users.noreply.github.com"
40+ npm version patch --no-git-tag-version
41+ VERSION=$(node -p "require('./package.json').version")
42+ git add package.json
43+ git commit -m "chore: bump version to $VERSION [skip ci]"
44+ git push
4345
4446 - name : Publish to npm
45- if : steps.version-check.outputs.published == 'false'
4647 run : pnpm publish --no-git-checks
4748 env :
4849 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments