File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 11name : publish
22
33on :
4- push :
5- tags :
6- - v*
74 release :
85 types : [published, released]
9-
10- # Allows you to run this workflow manually from the Actions tab
116 workflow_dispatch :
127
138jobs :
Original file line number Diff line number Diff line change @@ -38,14 +38,26 @@ jobs:
3838 github_token : ${{ secrets.GITHUB_TOKEN }}
3939 default_bump : ${{ inputs.semver }}
4040 custom_tag : ${{ inputs.custom_version }}
41- dry_run : ' true'
41+ dry_run : " true"
4242
4343 - name : Bump version and push tag
4444 if : inputs.dry_run == false
45- 46- with :
47- version : ${{ steps.tag_version.outputs.new_version }}
48- git-tag-version : ' true'
45+ run : |
46+ # Configure Git
47+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
48+ git config --local user.name "github-actions[bot]"
49+
50+ # Update package.json version
51+ npm version ${{ steps.tag_version.outputs.new_version }} --no-git-tag-version
52+
53+ # Commit changes
54+ git add package.json
55+ git commit -m "release: bump version into ${{ steps.tag_version.outputs.new_tag }}"
56+ git push
57+
58+ # Create and push tag
59+ git tag ${{ steps.tag_version.outputs.new_tag }}
60+ git push origin ${{ steps.tag_version.outputs.new_tag }}
4961
5062 - name : Create a GitHub release
5163 if : inputs.dry_run == false
6072 uses : benc-uk/workflow-dispatch@v1
6173 if : inputs.dry_run == false
6274 with :
63- workflow : publish.yml
75+ workflow : publish.yaml
You can’t perform that action at this time.
0 commit comments