-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (32 loc) · 1.01 KB
/
Copy pathmanual-tag.yml
File metadata and controls
35 lines (32 loc) · 1.01 KB
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
30
31
32
33
34
35
name: Manual Tag Creation
on:
workflow_dispatch:
inputs:
tag:
description: 'Next release tag'
required: true
permissions:
contents: read
jobs:
tag-creation:
permissions:
contents: write # for Git to git push
runs-on: cx-public-ubuntu-x64
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Tag
env:
INPUT_TAG: ${{ github.event.inputs.tag }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
echo "$INPUT_TAG"
echo "NEXT_VERSION=$INPUT_TAG" >> $GITHUB_ENV
message="$INPUT_TAG: PR #$PR_NUMBER $PR_TITLE"
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a "$INPUT_TAG" -m "$message"
git push origin "$INPUT_TAG"