-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
53 lines (46 loc) · 1.44 KB
/
action.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
---
name: Changeset Release Info
description: |
This action extracts information from a Changesets formatted CHANGELOG to use
in a github release.
inputs:
changelog:
description: Path to the Changesets formatted CHANGELOG.md
default: CHANGELOG.md
required: true
version:
description: The version to release
default: latest
required: true
outputs:
last-change-entry:
description: The description of the last change
value: ${{ steps.get-changelog-entry.outputs.changeentry }}
last-change-version:
description: The version of the last change (without v-prefix)
value: ${{ steps.get-changelog-entry.outputs.changeversion_no_v }}
last-change-version-v:
description: The version of the last change (including v-prefix)
value: ${{ steps.get-changelog-entry.outputs.changeversion_v }}
runs:
using: composite
steps:
- name: Validate action inputs
shell: bash
# yamllint disable rule:line-length
run: |
if [[ -z "${{ inputs.changelog }}" ]]; then
echo "error::Input 'changelog' is required"
exit 1
fi
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Get Changelog Entry
id: get-changelog-entry
shell: bash
run: |
python ${GITHUB_ACTION_PATH}/helper/last-change.py \
--changelog ${{ inputs.changelog }} \
--get-version ${{ inputs.version }}