mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-06-26 15:01:36 +02:00
feat: generate github release note
This commit is contained in:
parent
e81ff2283e
commit
5981db61d1
13
.github/workflows/release-pdf.yml
vendored
13
.github/workflows/release-pdf.yml
vendored
@ -25,13 +25,26 @@ jobs:
|
|||||||
pnpm install
|
pnpm install
|
||||||
pnpm export-pdf
|
pnpm export-pdf
|
||||||
'
|
'
|
||||||
|
# # For debugging, upload the pdfs as artifacts
|
||||||
# - uses: actions/upload-artifact@v3
|
# - uses: actions/upload-artifact@v3
|
||||||
# with:
|
# with:
|
||||||
# name: pdf
|
# name: pdf
|
||||||
# path: '*.pdf'
|
# path: '*.pdf'
|
||||||
|
- name: Generate changelog
|
||||||
|
run: |
|
||||||
|
# Get the previous tag
|
||||||
|
git fetch --tags
|
||||||
|
PREVIOUS_TAG=$(git tag --sort=-creatordate | head -n 2 | tail -n 1)
|
||||||
|
# Generate the changelog
|
||||||
|
git log --pretty=format:"%h %s" $PREVIOUS_TAG..HEAD > CHANGELOG
|
||||||
|
|
||||||
|
echo "Changelog from $PREVIOUS_TAG to HEAD:"
|
||||||
|
cat CHANGELOG
|
||||||
- name: Release PDF
|
- name: Release PDF
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
|
generate_release_notes: true
|
||||||
|
body_path: CHANGELOG
|
||||||
files: |
|
files: |
|
||||||
nixos-and-flakes-book.pdf
|
nixos-and-flakes-book.pdf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user