Elaborate Remark 10.3.3 #67
Workflow file for this run
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
name: Build Typst document | |
on: [push, workflow_dispatch] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Step 1: Download the typst archive | |
- name: Download Typst | |
run: wget https://github.com/typst/typst/releases/download/v0.11.1/typst-x86_64-unknown-linux-musl.tar.xz | |
# Step 2: Extract the typst archive | |
- name: Extract Typst | |
run: | | |
mkdir -p typst | |
tar -xf typst-x86_64-unknown-linux-musl.tar.xz -C typst | |
# Step 3: Add Typst to the system PATH | |
- name: Add Typst to PATH | |
run: echo "$(pwd)/typst/typst-x86_64-unknown-linux-musl" >> $GITHUB_PATH | |
# (Optional) Step 4: Verify Typst installation | |
- name: Verify Typst installation | |
run: typst --version | |
- name: Compile Typst | |
run: typst compile main.typ | |
# - name: Typst | |
# uses: lvignoli/typst-action@main | |
# with: | |
# source_file: main.typ | |
- name: Rename color PDF file | |
run: | | |
mv main.pdf hom-alg-notes-color.pdf | |
- name: Replace color scheme in template | |
run: | | |
sed -i '0,/color.typ/s//bw.typ/' libs/template.typ | |
# - name: Typst | |
# uses: lvignoli/typst-action@main | |
# with: | |
# source_file: main.typ | |
- name: Compile Typst | |
run: typst compile main.typ | |
- name: Rename BW PDF file | |
run: | | |
mv main.pdf hom-alg-notes-bw.pdf | |
- name: Upload PDF file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PDFs | |
path: | | |
hom-alg-notes-color.pdf | |
hom-alg-notes-bw.pdf | |
- name: Get current date | |
id: date | |
run: echo "DATE=$(date +%Y-%m-%d-%H:%M)" >> $GITHUB_ENV | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: github.ref_type == 'tag' | |
with: | |
name: "${{ github.ref_name }} - ${{ env.DATE }}" | |
files: "*.pdf" |