-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.54 KB
/
release.yaml
File metadata and controls
59 lines (49 loc) · 1.54 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
54
55
56
57
58
59
name: Generate release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
packages: write
jobs:
generate-release:
name: Generate release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set the release version
id: release
shell: bash
run: |
RELEASE_VERSION=${GITHUB_REF:10}
IS_PRERELEASE=false
if [[ "$RELEASE_VERSION" == *dev* ]]; then
IS_PRERELEASE=true
fi
{
echo "release_version=${RELEASE_VERSION}"
echo "is_prerelease=${IS_PRERELEASE}"
} >> "$GITHUB_OUTPUT"
echo "::notice::Release version: ${RELEASE_VERSION}"
echo "::notice::Is prerelease: ${IS_PRERELEASE}"
- name: Generate a changelog
uses: orhun/git-cliff-action@main
id: git-cliff
with:
config: fugit/configs/cliff.toml
args: -vv --latest --no-exec --github-repo ${{ github.repository }} --strip all
env:
GIT_CLIFF__REMOTE__GITHUB__OWNER: toggle-corp
GIT_CLIFF__REMOTE__GITHUB__REPO: banjo-utils
- name: Create Github Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: "${{ steps.release.outputs.release_version }}"
prerelease: ${{ steps.release.outputs.is_prerelease }}
body: ${{ steps.git-cliff.outputs.content }}