File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 12
12
name : Generate changelog
13
13
runs-on : ubuntu-22.04
14
14
outputs :
15
- release_body : ${{ steps.git-cliff .outputs.content }}
15
+ changelog_body : ${{ steps.read_changelog .outputs.CHANGELOG_BODY }}
16
16
steps :
17
17
- name : Checkout
18
18
uses : actions/checkout@v4
23
23
id : git-cliff
24
24
with :
25
25
config : cliff.toml
26
- args : -vv --latest --no-exec --github-repo ${{ github.repository }}
26
+ args : -vv --latest --no-exec --github-repo ${{ github.repository }} -o CHANGELOG.md
27
27
- name : Commit
28
28
run : |
29
29
git checkout ${{ github.ref_name }}
33
33
git add CHANGELOG.md
34
34
git commit -m "Update changelog"
35
35
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git ${{ github.ref_name }}
36
+ - name : Read CHANGELOG.md
37
+ id : read_changelog
38
+ shell : bash
39
+ run : |
40
+ r=$(cat CHANGELOG.md) # <--- Read release.md (Provide correct path as per your repo)
41
+ r="${r//'%'/'%25'}" # Multiline escape sequences for %
42
+ r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n'
43
+ r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r'
44
+ echo "CHANGELOG_BODY=$r" >> $GITHUB_OUTPUT # <--- Set environment variable
36
45
37
46
publish :
38
47
name : Build and publish shadowJar
60
69
with :
61
70
repo_token : ${{ secrets.GITHUB_TOKEN }}
62
71
tag : ${{ github.ref }}
63
- body : ${{ needs.changelog.outputs.release_body }}
72
+ body : ${{ needs.generate- changelog.outputs.changelog_body }}
64
73
file : out/*
65
74
file_glob : true
66
75
overwrite : true
You can’t perform that action at this time.
0 commit comments