Skip to content

Commit 6ba981c

Browse files
committed
refactor: changelog output
1 parent e3c6da1 commit 6ba981c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ jobs:
7272
echo "Release $VERSION ${{ inputs.bump }} by ${{ github.actor }}" >> "$GITHUB_RUN_NAME"
7373
7474
- name: Generate changelog
75-
run: npx git-cliff --tag ${{ steps.bump.outputs.version }} -o CHANGELOG.md
75+
id: changelog
76+
run: |
77+
npx git-cliff --tag ${{ steps.bump.outputs.version }} -o CHANGELOG.md
78+
echo "notes<<EOF" >> "$GITHUB_OUTPUT"
79+
npx git-cliff --latest --strip all >> "$GITHUB_OUTPUT"
80+
echo "EOF" >> "$GITHUB_OUTPUT"
7681
7782
- name: Commit, tag, push
7883
run: |
@@ -83,10 +88,9 @@ jobs:
8388
8489
- name: Create GitHub Release
8590
run: |
86-
NOTES=$(npx git-cliff --tag ${{ steps.bump.outputs.version }} --current --strip all)
8791
gh release create ${{ steps.bump.outputs.version }} \
8892
--title "${{ steps.bump.outputs.version }}" \
89-
--notes "$NOTES" \
93+
--notes "${{ steps.changelog.outputs.notes }}"
9094
${{ inputs.prerelease == 'true' && '--prerelease' || '' }}
9195
env:
9296
GH_TOKEN: ${{ secrets.RELEASE_PAT }}

0 commit comments

Comments
 (0)