File tree Expand file tree Collapse file tree 1 file changed +24
-7
lines changed
Expand file tree Collapse file tree 1 file changed +24
-7
lines changed Original file line number Diff line number Diff line change 1+ # example 2: on merge to master from pull request (recommended)
12name : Bump version
23on :
34 push :
45 branches :
56 - main
7+ # name: Bump version
8+ # on:
9+ # pull_request:
10+ # types:
11+ # - closed
12+ # branches:
13+ # - main
14+
615jobs :
716 build :
8- runs-on : ubuntu-latest
17+ if : github.event.pull_request.merged == true
18+ runs-on : ubuntu-22.04
19+ permissions :
20+ contents : write
921 steps :
10- - uses : actions/checkout@master
11- - name : Bump version and push tag
12- uses : hennejg/github-tag-action@master
13- with :
14- github_token : ${{ secrets.GITHUB_TOKEN }}
15- release_branches : main
22+ - uses : actions/checkout@v4
23+ with :
24+ ref : ${{ github.event.pull_request.merge_commit_sha }}
25+ fetch-depth : ' 0'
26+
27+ - name : Bump version and push tag
28+ uses : anothrNick/github-tag-action@v1
29+ env :
30+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+ TAG_PREFIX : v
32+ PRERELEASE : true
You can’t perform that action at this time.
0 commit comments