Skip to content

Commit e31c5df

Browse files
committed
Add update-main-version.yml workflow
1 parent 8b801ba commit e31c5df

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Original version
2+
# https://github.com/actions/checkout/blob/11bd71901bbe5b1630ceea73d27597364c9af683/.github/workflows/update-main-version.yml
3+
name: Update Main Version
4+
run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
target:
10+
description: The tag or reference to use
11+
required: true
12+
major_version:
13+
type: choice
14+
description: The major version to update
15+
options:
16+
- v4
17+
18+
jobs:
19+
tag:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Git config
26+
run: |
27+
git config user.name "github-actions[bot]"
28+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
29+
- name: Tag new target
30+
run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
31+
- name: Push new tag
32+
run: git push origin ${{ github.event.inputs.major_version }} --force

0 commit comments

Comments
 (0)