Skip to content

Commit de40f07

Browse files
committed
feat: release both pdf & epub
1 parent 7b394aa commit de40f07

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/release-pdf.yml renamed to .github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Release PDF"
1+
name: "Release"
22
on:
33
push:
44
tags:
@@ -19,6 +19,7 @@ jobs:
1919
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
2020
- name: Show nixpkgs version
2121
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
22+
2223
- name: Generate PDF
2324
run: |
2425
nix develop .#export-pdf --ignore-environment --command bash -c '
@@ -27,6 +28,13 @@ jobs:
2728
pnpm install
2829
pnpm export-pdf
2930
'
31+
- name: Generate EPUB
32+
run: |
33+
nix develop .#default --ignore-environment --command bash -c '
34+
set -e
35+
pnpm install
36+
pnpm run export-epub
37+
'
3038
# # For debugging, upload the pdfs as artifacts
3139
# - uses: actions/upload-artifact@v3
3240
# with:
@@ -38,15 +46,16 @@ jobs:
3846
git fetch --tags
3947
PREVIOUS_TAG=$(git tag --sort=-creatordate | head -n 2 | tail -n 1)
4048
# Generate the changelog
41-
git log --pretty=format:"%h %s" $PREVIOUS_TAG..HEAD > CHANGELOG
49+
git log --pretty=format:"%h %s" "$PREVIOUS_TAG"..HEAD > CHANGELOG
4250
4351
echo "Changelog from $PREVIOUS_TAG to HEAD:"
4452
cat CHANGELOG
45-
- name: Release PDF
53+
- name: Release
4654
uses: softprops/action-gh-release@v2
4755
if: startsWith(github.ref, 'refs/tags/')
4856
with:
4957
generate_release_notes: true
5058
body_path: CHANGELOG
5159
files: |
5260
nixos-and-flakes-book.pdf
61+
nixos-and-flakes-book.epub

0 commit comments

Comments
 (0)