-
Notifications
You must be signed in to change notification settings - Fork 7
29 lines (27 loc) · 857 Bytes
/
do-tag.yml
File metadata and controls
29 lines (27 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: 🚀 Do tag.
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch name (e.g. release/3.3.0)'
required: true
tag:
description: 'Tag name (e.g., v3.3.1)'
required: true
jobs:
do-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Switch to the branch and create a tag
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git fetch origin "${{ github.event.inputs.branch }}"
git fetch -p -P -t -f
git checkout "${{ github.event.inputs.branch }}"
git tag "${{ github.event.inputs.tag }}"
git push origin "${{ github.event.inputs.tag }}"