diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..45dc4fa01 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,115 @@ +name: Build + +on: + - push + +jobs: + dependencies: + name: Build dependencies + runs-on: ubuntu-latest + outputs: + version: ${{ steps.version.outputs.version }} + + steps: + - name: Set up Git repository + uses: actions/checkout@v1 + + - name: Create global variables + id: version + run: echo "::set-output name=version::$(git rev-parse --short HEAD)" + + build: + name: Build documents + needs: dependencies + runs-on: ubuntu-latest + strategy: + matrix: + sources: + - input: ctfp-print.tex + output: ctfp-print.pdf + - input: ctfp-reader.tex + output: ctfp-reader.pdf + - input: ctfp-print-scala.tex + output: ctfp-print-scala.pdf + - input: ctfp-reader-scala.tex + output: ctfp-reader-scala.pdf + - input: ctfp-reader-ocaml.tex + output: ctfp-reader-ocaml.pdf + - input: ctfp-print-ocaml.tex + output: ctfp-print-ocaml.pdf + + steps: + - name: Set up Git repository + uses: actions/checkout@v1 + + - name: Create necessary build file (version.tex) + run: | + echo -n -e "\\\newcommand{\OPTversion}{$(git rev-parse --short HEAD)}" > src/version.tex + + - name: Build documents using LaTeX (${{ matrix.sources.input }}) + uses: xu-cheng/latex-action@v2 + with: + working_directory: src + latexmk_use_xelatex: true + root_file: ${{ matrix.sources.input }} + latexmk_shell_escape: true + + - name: Upload build assets (${{ matrix.sources.output }}) + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.sources.output }} + path: src/${{ matrix.sources.output }} + + release: + name: "Create Github tag/pre-release" + runs-on: ubuntu-latest + needs: [dependencies,build] + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Create Github pre-release (${{ needs.dependencies.outputs.version }}) + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ needs.dependencies.outputs.version }} + release_name: Version ${{ needs.dependencies.outputs.version }} + draft: false + prerelease: true + + assets: + name: Upload release assets + runs-on: ubuntu-latest + needs: [dependencies,release] + strategy: + matrix: + assets: + - source: ctfp-print.pdf + destination: category-theory-for-programmers--print-- + - source: ctfp-reader.pdf + destination: category-theory-for-programmers-- + - source: ctfp-print-scala.pdf + destination: category-theory-for-programmers--print--scala-- + - source: ctfp-reader-scala.pdf + destination: category-theory-for-programmers--reader--scala-- + - source: ctfp-print-ocaml.pdf + destination: category-theory-for-programmers--print--ocaml-- + - source: ctfp-reader-ocaml.pdf + destination: category-theory-for-programmers--reader--ocaml-- + steps: + - name: Download build assets (${{ matrix.assets.source }}) + uses: actions/download-artifact@v2 + with: + name: ${{ matrix.assets.source }} + path: ${{ matrix.assets.source }} + + - name: Upload release assets (${{ matrix.assets.destination }}${{ needs.dependencies.outputs.version }}.pdf) + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.release.outputs.upload_url }} + asset_path: ${{ matrix.assets.source }}/${{ matrix.assets.source }} + asset_name: ${{ matrix.assets.destination }}${{ needs.dependencies.outputs.version }}.pdf + asset_content_type: application/pdf diff --git a/src/fonts/Inconsolata-LGC-Bold.ttf b/src/fonts/Inconsolata-LGC-Bold.ttf new file mode 100644 index 000000000..bf7146441 Binary files /dev/null and b/src/fonts/Inconsolata-LGC-Bold.ttf differ diff --git a/src/fonts/Inconsolata-LGC-BoldItalic.ttf b/src/fonts/Inconsolata-LGC-BoldItalic.ttf new file mode 100644 index 000000000..e1d74fb51 Binary files /dev/null and b/src/fonts/Inconsolata-LGC-BoldItalic.ttf differ diff --git a/src/fonts/Inconsolata-LGC-Italic.ttf b/src/fonts/Inconsolata-LGC-Italic.ttf new file mode 100644 index 000000000..fa78ec9c7 Binary files /dev/null and b/src/fonts/Inconsolata-LGC-Italic.ttf differ diff --git a/src/fonts/Inconsolata-LGC.ttf b/src/fonts/Inconsolata-LGC.ttf new file mode 100644 index 000000000..cdc366b54 Binary files /dev/null and b/src/fonts/Inconsolata-LGC.ttf differ diff --git a/src/fonts/LibertinusKeyboard-Regular.otf b/src/fonts/LibertinusKeyboard-Regular.otf new file mode 100644 index 000000000..d551e6ad6 Binary files /dev/null and b/src/fonts/LibertinusKeyboard-Regular.otf differ diff --git a/src/fonts/LibertinusMath-Regular.otf b/src/fonts/LibertinusMath-Regular.otf new file mode 100644 index 000000000..4e3c668fe Binary files /dev/null and b/src/fonts/LibertinusMath-Regular.otf differ diff --git a/src/fonts/LibertinusMono-Regular.otf b/src/fonts/LibertinusMono-Regular.otf new file mode 100644 index 000000000..5cf805fe5 Binary files /dev/null and b/src/fonts/LibertinusMono-Regular.otf differ diff --git a/src/fonts/LibertinusSans-Bold.otf b/src/fonts/LibertinusSans-Bold.otf new file mode 100644 index 000000000..cae08b865 Binary files /dev/null and b/src/fonts/LibertinusSans-Bold.otf differ diff --git a/src/fonts/LibertinusSans-Italic.otf b/src/fonts/LibertinusSans-Italic.otf new file mode 100644 index 000000000..5131cf2bf Binary files /dev/null and b/src/fonts/LibertinusSans-Italic.otf differ diff --git a/src/fonts/LibertinusSans-Regular.otf b/src/fonts/LibertinusSans-Regular.otf new file mode 100644 index 000000000..d88c11379 Binary files /dev/null and b/src/fonts/LibertinusSans-Regular.otf differ diff --git a/src/fonts/LibertinusSerif-Bold.otf b/src/fonts/LibertinusSerif-Bold.otf new file mode 100644 index 000000000..39a8ee5e1 Binary files /dev/null and b/src/fonts/LibertinusSerif-Bold.otf differ diff --git a/src/fonts/LibertinusSerif-BoldItalic.otf b/src/fonts/LibertinusSerif-BoldItalic.otf new file mode 100644 index 000000000..d63f36e2e Binary files /dev/null and b/src/fonts/LibertinusSerif-BoldItalic.otf differ diff --git a/src/fonts/LibertinusSerif-Italic.otf b/src/fonts/LibertinusSerif-Italic.otf new file mode 100644 index 000000000..ddf1996b4 Binary files /dev/null and b/src/fonts/LibertinusSerif-Italic.otf differ diff --git a/src/fonts/LibertinusSerif-Regular.otf b/src/fonts/LibertinusSerif-Regular.otf new file mode 100644 index 000000000..e42f25c54 Binary files /dev/null and b/src/fonts/LibertinusSerif-Regular.otf differ diff --git a/src/fonts/LibertinusSerif-Semibold.otf b/src/fonts/LibertinusSerif-Semibold.otf new file mode 100644 index 000000000..4d3a0268b Binary files /dev/null and b/src/fonts/LibertinusSerif-Semibold.otf differ diff --git a/src/fonts/LibertinusSerif-SemiboldItalic.otf b/src/fonts/LibertinusSerif-SemiboldItalic.otf new file mode 100644 index 000000000..df0e63279 Binary files /dev/null and b/src/fonts/LibertinusSerif-SemiboldItalic.otf differ diff --git a/src/fonts/LibertinusSerifDisplay-Regular.otf b/src/fonts/LibertinusSerifDisplay-Regular.otf new file mode 100644 index 000000000..9972f9539 Binary files /dev/null and b/src/fonts/LibertinusSerifDisplay-Regular.otf differ diff --git a/src/fonts/LibertinusSerifInitials-Regular.otf b/src/fonts/LibertinusSerifInitials-Regular.otf new file mode 100644 index 000000000..7c1fc436b Binary files /dev/null and b/src/fonts/LibertinusSerifInitials-Regular.otf differ diff --git a/src/preamble.tex b/src/preamble.tex index 147b1e0a5..905606229 100644 --- a/src/preamble.tex +++ b/src/preamble.tex @@ -23,7 +23,7 @@ \defaultfontfeatures{% % is important for Scale=MatchLowercase, % needed here ... % single quotes not } % to turn out curly -\setmonofont[BoldFont={Inconsolata LGC Bold}]{Inconsolata LGC} % ("typographic") +\setmonofont[Path=fonts/, BoldFont=Inconsolata-LGC-Bold.ttf]{Inconsolata-LGC-Bold.ttf} % ("typographic") % in verbatim blocks \defaultfontfeatures{% % of Haskell code. Scale=MatchLowercase, % ... and here again % Now the quote is @@ -43,7 +43,7 @@ \expandafter\let\csname not<\endcsname\relax \expandafter\let\csname not>\endcsname\relax \usepackage{unicode-math} -\setmathfont{Libertinus Math} +\setmathfont[Path=fonts/]{LibertinusMath-Regular.otf} \usepackage[all]{nowidow} \usepackage{emptypage}