File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : " bump-version"
3+
4+ # yamllint disable-line rule:truthy
5+ on :
6+ workflow_dispatch :
7+ inputs :
8+ bump_type :
9+ description : " Bump type"
10+ default : " patch"
11+ required : true
12+ type : choice
13+ options :
14+ - patch
15+ - minor
16+ - major
17+
18+ env :
19+ GITHUB_ACCESS_TOKEN : ${{ secrets.GH_ACCESS_TOKEN }}
20+
21+ jobs :
22+ bump-version :
23+ name : bump-version
24+ runs-on : ubuntu-22.04
25+
26+ steps :
27+ - name : Checkout
28+ 29+ with :
30+ fetch-depth : 0
31+ token : ${{ env.GITHUB_ACCESS_TOKEN }}
32+
33+ - name : Get Latest Tag
34+ id : latest-tag
35+ run : |
36+ echo GIT_LATEST_TAG="$(git describe --tags "$(git rev-list --tags --max-count=1)")" >>"$GITHUB_OUTPUT"
37+
38+ - name : Compute Next Tag
39+ id : next-tag
40+ uses : docker://ghcr.io/dokku/semver-generator:latest
41+ with :
42+ bump : ${{ github.event.inputs.bump_type }}
43+ input : ${{ steps.latest-tag.outputs.GIT_LATEST_TAG }}
44+
45+ - name : Create and Push Tag
46+ run : |
47+ git config --global user.name 'Dokku Bot'
48+ git config --global user.email [email protected] 49+ git tag "$GIT_NEXT_TAG"
50+ git push origin "$GIT_NEXT_TAG"
51+ env :
52+ GIT_NEXT_TAG : ${{ steps.next-tag.outputs.version }}
You can’t perform that action at this time.
0 commit comments