-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaction.yml
More file actions
64 lines (60 loc) · 2.12 KB
/
action.yml
File metadata and controls
64 lines (60 loc) · 2.12 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: Changelogs generated with git-cliff
description: Generate Changelog with a customized template
author: tj-actions
inputs:
args:
description: "Extra args passed directly to [git-cliff](https://github.com/orhun/git-cliff#command-line-arguments)"
required: false
default: "--verbose"
output:
description: "Output file"
required: false
default: "HISTORY.md"
template-config:
description: "Path or URL to the template `cliff.toml` config file. See [`cliff-template.toml`](./cliff-template.toml) for a working example. **NOTE:** Only the `REPOSITORY_URL` is substituted."
required: false
git-cliff-version:
description: "Provide the version for git-cliff. e.g latest, v2.10.0"
required: false
default: "latest"
token:
description: 'GITHUB_TOKEN or a Repo scoped PAT'
required: false
default: ${{ github.token }}
runs:
using: 'composite'
steps:
- run: |
bash $GITHUB_ACTION_PATH/entrypoint.sh
id: git-cliff
shell: bash
env:
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
INPUT_REPOSITORY_URL: ${{ github.server_url }}/${{ github.repository }}
INPUT_TEMPLATE_CONFIG: ${{ inputs.template-config }}
- name: Install git-cliff
id: install-git-cliff
uses: tj-actions/setup-bin@v1.2.3
with:
token: ${{ inputs.token }}
repository-owner: orhun
repository: git-cliff
language-type: rust
add-prefix-to-version: false
version: ${{ inputs.git-cliff-version }}
- name: Generate a changelog
shell: bash
run: |
${{ steps.install-git-cliff.outputs.binary_path }} --config "${{ steps.git-cliff.outputs.output_path }}" \
--output "${{ inputs.output }}" \
${{ inputs.args }}
- name: Cleanup
shell: bash
run: |
bash $GITHUB_ACTION_PATH/cleanup.sh
env:
INPUT_OUTPUT_PATH: ${{ steps.git-cliff.outputs.output_path }}
branding:
icon: check-square
color: white