forked from gravwell/training
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default.nix and update build workflow
- Loading branch information
1 parent
643d93c
commit 9e1e52e
Showing
4 changed files
with
54 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
training-pdf-builder: | ||
runs-on: ubuntu-latest | ||
name: Build the training PDF and Release | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Nix | ||
uses: cachix/install-nix-action@v25 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
|
||
- name: Build PDF | ||
run: | | ||
nix-build | ||
- name: Update PDF name | ||
run: | | ||
cp result/master.pdf gravwell_training_${{ github.ref_name }}.pdf | ||
- name: Publish | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release create ${{ github.ref_name }} gravwell_training_${{ github.ref_name }}.pdf --verify-tag --generate-notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ gravwell_training.tgz | |
*.ilg | ||
*.ind | ||
*.tgz | ||
result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
let | ||
pkgs = import (fetchTarball | ||
"https://github.com/NixOS/nixpkgs/archive/a6292e34000dc93d43bccf78338770c1c5ec8a99.tar.gz") | ||
{ }; | ||
|
||
in pkgs.stdenv.mkDerivation { | ||
name = "Gravwell Training"; | ||
src = ./.; | ||
|
||
buildInputs = [ pkgs.texlive.combined.scheme-full ]; | ||
|
||
buildPhase = '' | ||
make master.pdf | ||
''; | ||
|
||
installPhase = '' | ||
mkdir $out | ||
cp master.pdf $out | ||
''; | ||
} |