Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Optional: Automatically load Nix development environment when entering this directory
# Requires direnv (https://direnv.net/) and nix-direnv for automatic shell activation
# If you don't use direnv, run 'nix develop' manually instead
use flake
export PAPERBACK_COMMIT_HASH=dev
53 changes: 47 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
permissions:
contents: write
jobs:
build:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -62,13 +62,53 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: paperback-build
name: paperback-windows
path: |
target/release/paperback.zip
target/release/paperback.zip.minisig
target/release/paperback_setup.exe
target/release/paperback_setup.exe.minisig
retention-days: 30

build-linux-flatpak:
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-49
options: --privileged
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Generate cargo sources for Flatpak
run: |
pip install aiohttp tomlkit
curl -sSL https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/cargo/flatpak-cargo-generator.py -o flatpak-cargo-generator.py
python3 flatpak-cargo-generator.py Cargo.lock -o cargo-sources.json
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: paperback.flatpak
manifest-path: io.github.trypsynth.Paperback.yaml
cache-key: flatpak-builder-${{ github.sha }}

release:
needs: [build-windows, build-linux-flatpak]
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download Windows artifacts
uses: actions/download-artifact@v4
with:
name: paperback-windows
path: windows-build
- name: Download Linux Flatpak
uses: actions/download-artifact@v4
with:
name: paperback-x86_64.flatpak
path: linux-build
- name: Get latest tag reachable from HEAD
id: get_tag
shell: bash
Expand Down Expand Up @@ -98,10 +138,11 @@ jobs:
## Commits since last release
${{ steps.release_notes.outputs.commits }}
files: |
target/release/paperback.zip
target/release/paperback.zip.minisig
target/release/paperback_setup.exe
target/release/paperback_setup.exe.minisig
windows-build/paperback.zip
windows-build/paperback.zip.minisig
windows-build/paperback_setup.exe
windows-build/paperback_setup.exe.minigig
linux-build/paperback.flatpak
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ web/_site/
*.pdf
*.rtf
.DS_Store
result
.direnv/
.flatpak-builder/
*.flatpak
repo-flatpak/
cargo-sources.json
Loading