-
Notifications
You must be signed in to change notification settings - Fork 32
65 lines (64 loc) · 1.93 KB
/
test.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
name: Test the changelog action
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
uses: actions/checkout@v4
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@main
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
head-ref: 'v0.0.2'
base-ref: 'v0.0.1'
- name: Reverse the generated changelog
id: changelog-rev
uses: metcalfc/changelog-generator@main
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
head-ref: 'v0.0.2'
base-ref: 'v0.0.1'
reverse: 'true'
- name: Explicitly do not reverse the generated changelog
id: changelog-notrev
uses: metcalfc/changelog-generator@main
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
head-ref: 'v0.0.2'
base-ref: 'v0.0.1'
reverse: 'false'
- name: Get the changelog
run: |
cat << "EOF"
${{ steps.changelog.outputs.changelog }}
EOF
- name: Modify the changelog
id: modified
run: |
set -o noglob
log=$(cat << "EOF" | grep -v Bumping | tac
${{ steps.changelog.outputs.changelog }}
EOF
)
log="${log//'%'/'%25'}"
log="${log//$'\n'/'%0A'}"
log="${log//$'\r'/'%0D'}"
echo "modified=$log" >> $GITHUB_OUTPUT
- name: Print the modified changelog
run: |
cat << "EOF"
${{ steps.modified.outputs.modified }}
EOF
- name: Generate changelog from release
id: release
uses: metcalfc/changelog-generator@main
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Get the changelog
run: |
cat << "EOF"
${{ steps.release.outputs.changelog }}
EOF