-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1 KB
/
release.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
on:
workflow_dispatch:
inputs:
releaseVersion:
type: string
description: New version for the release.
required: true
jobs:
release:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Tag release
shell: sh
env:
RELEASE_VERSION: ${{ inputs.releaseVersion }}
GH_TOKEN: ${{ github.token }}
run: |
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
git tag -a "${RELEASE_VERSION}" -m "Release ${RELEASE_VERSION}"
git push origin "${RELEASE_VERSION}"
gh release create "${RELEASE_VERSION}" \
--repo="$GITHUB_REPOSITORY" \
--generate-notes \
--latest \
--title "${RELEASE_VERSION}"