File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Move Major Version Tag on Release
2+
3+ on :
4+ release :
5+ types : [ published ]
6+ workflow_dispatch :
7+ inputs :
8+ release_tag :
9+ required : true
10+ type : string
11+
12+ jobs :
13+ move_major_version_tag :
14+ runs-on : ubuntu-latest
15+ steps :
16+
17+ # Checks out the code from your repository with all history for all
18+ # branches and tags. This is important if the workflow is launched via
19+ # workspace_dispatch event. It ensures that we can find the release tag
20+ # and the major version tag.
21+ - uses : actions/checkout@v4
22+ with :
23+ # Fetch all history for all branches and tags
24+ fetch-depth : 0
25+
26+ # Configures the git user config. This is necessary when making changes
27+ # to a git repository.
28+ - uses : cgrindel/gha_configure_git_user@v1
29+
30+ # The release tag can come into the workflow via the release event or as
31+ # a workflow_dispatch event. This step finds the first non-empty value
32+ # and outputs it as `selected_value`.
33+ - name : Resolve release_tag
34+ id : resolve_release_tag
35+ uses : cgrindel/gha_select_value@v1
36+ with :
37+ value0 : ${{ github.event.release.tag_name }}
38+ value1 : ${{ github.event.inputs.release_tag }}
39+
40+ # Create or move the major version tag
41+ - uses : cgrindel/gha_move_major_version_tag@v1
42+ with :
43+ release_tag : ${{ steps.resolve_release_tag.outputs.selected_value }}
You can’t perform that action at this time.
0 commit comments