-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (66 loc) · 1.73 KB
/
cliff.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
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
65
66
67
68
69
70
71
name: Release
on:
workflow_call:
inputs:
runs_on:
default: ubuntu-latest
required: false
type: string
name:
default: Generate a changelog
required: false
type: string
cliff_args:
default: --verbose
required: false
type: string
file_path:
default: ""
required: true
type: string
binary_name:
default: ""
required: true
type: string
binary_path:
default: ""
required: true
type: string
secrets:
gh_token:
required: true
jobs:
changelog:
name: ${{ inputs.name }}
runs-on: ${{ inputs.runs_on }}
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: ${{ inputs.name }}
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ${{ inputs.name }}
uses: orhun/git-cliff-action@v3
with:
config: cliff.toml
args: ${{ inputs.cliff_args }}
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
upload:
name: Upload the release
needs: changelog
runs-on: ${{ inputs.runs_on }}
steps:
- uses: actions/download-artifact@v3
with:
name: ${{ inputs.binary_name }}
path: ${{ inputs.binary_path }}
- name: Upload the binary releases
uses: svenstaro/upload-release-action@v2
with:
file: ${{ inputs.file_path }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
body: ${{ needs.changelog.outputs.release_body }}