Skip to content

Commit 647e955

Browse files
authored
[Release management] - Move the major version tag (such as v1, v2) to point to the Git ref of the current release. (#750)
Create update-main-version.yml
1 parent 4a451e2 commit 647e955

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow is used to move the major version tag (such as v1, v2)
2+
# to point to the Git ref of the current release.
3+
# This allows users to use the latest version of this action by specifying the major version.
4+
5+
name: Update Main Version
6+
run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
target:
12+
description: The tag or reference to use
13+
required: true
14+
major_version:
15+
type: choice
16+
description: The major version to update
17+
options:
18+
- v1
19+
20+
jobs:
21+
tag:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
- name: Git config
28+
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
31+
- name: Tag new target
32+
run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
33+
- name: Push new tag
34+
run: git push origin ${{ github.event.inputs.major_version }} --force

0 commit comments

Comments
 (0)