-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (60 loc) · 2.25 KB
/
Copy pathrelease.yml
File metadata and controls
64 lines (60 loc) · 2.25 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
60
61
62
63
64
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
uses: ./.github/workflows/_build.yml
with:
artifact_name: win-x64
archive_prefix: ArknightsAutoOperator-win-x64-${{ github.ref_name }}
version: ${{ github.ref_name }}
git_cliff:
name: Generate release notes
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Generate release notes
shell: bash
env:
GITHUB_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
version="2.13.1"
archive="git-cliff-${version}-x86_64-unknown-linux-gnu.tar.gz"
mkdir -p "$RUNNER_TEMP/git-cliff"
curl -fsSL "https://github.com/orhun/git-cliff/releases/download/v${version}/$archive" -o "$RUNNER_TEMP/$archive"
tar -xzf "$RUNNER_TEMP/$archive" -C "$RUNNER_TEMP/git-cliff"
git_cliff="$(find "$RUNNER_TEMP/git-cliff" -type f -name git-cliff -perm -111 | head -n 1)"
if [[ -z "$git_cliff" ]]; then
echo "[ERR] git-cliff binary was not found after extraction"
exit 1
fi
"$git_cliff" --config .github/cliff.toml --latest --strip header --output CHANGES.md
- name: Upload release notes
uses: actions/upload-artifact@v7
with:
name: release-notes
path: CHANGES.md
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build, git_cliff]
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v7
with:
path: release-assets
merge-multiple: true
- uses: softprops/action-gh-release@v3
with:
body_path: release-assets/CHANGES.md
files: |
release-assets/*.zip