File tree Expand file tree Collapse file tree 1 file changed +20
-16
lines changed Expand file tree Collapse file tree 1 file changed +20
-16
lines changed Original file line number Diff line number Diff line change 12
12
type : string
13
13
14
14
jobs :
15
- create_tag :
15
+ build :
16
+ if : github.event.pull_request.merged == true
16
17
runs-on : ubuntu-latest
17
-
18
- env :
19
- GIT_USER_NAME : " Infra Workleap"
20
- GIT_USER_EMAIL :
" [email protected] "
21
- SOURCE_VERSION_MESSAGE : " Automated tag creation"
22
-
18
+ permissions :
19
+ contents : write
23
20
steps :
24
- - name : Checkout repository
25
- uses : actions/checkout@v4
21
+ - uses : actions/checkout@v4
22
+ with :
23
+ ref : ${{ github.event.pull_request.merge_commit_sha }}
24
+ fetch-depth : ' 0'
25
+
26
+ - name : Set git author
27
+ run : |
28
+ git config --global user.name "github-actions[bot]"
29
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
26
30
27
- - name : Create Git Tag
28
- run : |
29
- echo "Creating tag [${buildVersion}] with message: ${{ env.SOURCE_VERSION_MESSAGE }}"
30
- git config --global user.name "${{ env.GIT_USER_NAME }}"
31
- git config --global user.email "${{ env.GIT_USER_EMAIL }}"
32
- git tag -a ${buildVersion} -m "${{ env.SOURCE_VERSION_MESSAGE }}"
33
- git push origin --tags
31
+ - name : Bump version and push tag
32
+ uses : anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version
33
+ env :
34
+ DEFAULT_BUMP : patch
35
+ INITIAL_VERSION : 1.0.0
36
+ WITH_V : false
37
+ PRERELEASE : false
You can’t perform that action at this time.
0 commit comments