mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-12-24 23:59:21 +01: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 export-pdf
|
||||
'
|
||||
# # For debugging, upload the pdfs as artifacts
|
||||
# - uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: 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
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
generate_release_notes: true
|
||||
body_path: CHANGELOG
|
||||
files: |
|
||||
nixos-and-flakes-book.pdf
|
||||
|
Loading…
Reference in New Issue
Block a user