File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 - " closed"
2626
2727jobs :
28- share_version :
28+ tag_with_version :
2929 if : ${{ github.event.pull_request.merged }}
3030 runs-on : ubuntu-latest
31- outputs :
32- version : " ${{ steps.get_version.outputs.version }}"
3331 steps :
3432 - name : Checkout
3533 uses : actions/checkout@v4
36- - name : Get Version
37- id : get_version
34+ - name : Tag and Push Version
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3837 run : |
3938 version="v$(cat version.txt)"
4039 echo "Version: $version"
41- # Set the version as an output
42- echo "::set-output name=version::$version"
43- push_tag :
44- if : ${{ github.event.pull_request.merged }}
45- runs-on : ubuntu-latest
46- needs : read_version
47- steps :
48- - name : Tag commit
49- uses : tvdias/github-tagger@v0.0.1
50- with :
51- repo-token : " ${{ secrets.GITHUB_TOKEN }}"
52- tag : " ${{ needs.share_version.outputs.version }}"
40+ git config user.name "GitHub Actions"
41+ git config user.email "actions@github.com"
42+ git tag -a "$version" -m "generated on pull request"
43+ git push origin "$version"
You can’t perform that action at this time.
0 commit comments