-
Notifications
You must be signed in to change notification settings - Fork 8
43 lines (36 loc) · 1.25 KB
/
release.yaml
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
name: release
on:
workflow_dispatch:
inputs:
release_version:
description: 'Which version are we releasing? (format vX.Y.Z)'
required: true
permissions:
contents: write
jobs:
release:
name: "release"
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Configure github-actions[bot]
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Generate and Push Tags
run: |
version=${{ github.event.inputs.release_version }}
major=$(echo $version | cut -d. -f1)
minor=$(echo $version | cut -d. -f1-2)
git tag $version
git tag $minor -f
git tag $major -f
git push --set-upstream origin --tags -f
- name: Create GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run : |
gh release create "${{ github.event.inputs.release_version }}" --generate-notes