mirror of
https://github.com/ryan4yin/nixos-and-flakes-book
synced 2024-11-22 20:23:10 +00:00
feat: generate github release note
This commit is contained in:
parent
e81ff2283e
commit
5981db61d1
1 changed files with 13 additions and 0 deletions
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 a new issue