Create update-main-version

This commit is contained in:
Muhammad Atif Ali 2024-05-23 12:02:21 +03:00 committed by GitHub
parent 8f1095a1d9
commit 2909d6cadc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

30
.github/workflows/update-main-version vendored Normal file
View file

@ -0,0 +1,30 @@
name: Update Main Version
run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
on:
workflow_dispatch:
inputs:
target:
description: The tag or reference to use
required: true
major_version:
type: choice
description: The major version to update
options:
- v3
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git config
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Tag new target
run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
- name: Push new tag
run: git push origin ${{ github.event.inputs.major_version }} --force