-
Notifications
You must be signed in to change notification settings - Fork 51
53 lines (43 loc) · 1.58 KB
/
release.yml
File metadata and controls
53 lines (43 loc) · 1.58 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Requires repository secret RELEASE_TOKEN (fine-grained PAT: Contents read/write on this repo).
# See CONTRIBUTING.md — "Personal access token for releases".
name: Release
run-name: Release v${{ github.event.inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: "Release version (e.g. 1.2.0), no v prefix"
required: true
type: string
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout develop
uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Install yq
run: |
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq
- name: Run release script
run: ./release.sh "${{ github.event.inputs.version }}"
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.version }}
name: Release v${{ github.event.inputs.version }}
body: |
Release v${{ github.event.inputs.version }}
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/${{ github.event.inputs.version }}/CHANGELOG.md) for details.