-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (38 loc) · 1.28 KB
/
create-tag.yml
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
36
37
38
39
40
41
42
43
44
name: Create Version Tag
on:
workflow_dispatch:
inputs:
tag:
type: string
description: Tag Version (exclude prefix; e.g. 1.2.3)
required: true
jobs:
tag-changelog:
runs-on: ubuntu-22.04
timeout-minutes: 10
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Fail on tags
run: exit 1
if: ${{ !startsWith(github.ref, 'refs/heads/') }}
- name: Validate Tag Input
id: input
run: |
vtag=${{ github.event.inputs.tag }}
echo "tag=${vtag//v}" >> $GITHUB_OUTPUT
- uses: hmarr/debug-action@a701ed95a46e6f2fb0df25e1a558c16356fae35a
- uses: actions/checkout@96f53100ba2a5449eb71d2e6604bbcd94b9449b5
with:
fetch-depth: 0 # fetch all history for all branches and tags
# https://medium.com/prompt/trigger-another-github-workflow-without-using-a-personal-access-token-f594c21373ef
ssh-key: "${{ secrets.COMMIT_KEY }}"
- name: Create Git Tag
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git config commit.gpgsign false
git tag v${{ steps.input.outputs.tag }} -m "Release v${{ steps.input.outputs.tag }}"
git push --tags origin