name: Build Typst PDF run-name: Build PDF for ${{ gitea.actor }} on master on: push: branches: - master jobs: build: runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v3 - name: Install FiraCode Nerd Font run: | mkdir -p fonts wget -qO FiraCode.zip https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraCode.zip unzip -q FiraCode.zip -d fonts - name: Install Typst CLI run: | # Download the latest CLI binary for Linux wget -qO- https://github.com/typst/typst/releases/latest/download/typst-x86_64-unknown-linux-musl.tar.xz | tar -xJ # Move binary to path (assuming standard Linux runner) mv typst-x86_64-unknown-linux-musl/typst /usr/local/bin/typst chmod +x /usr/local/bin/typst - name: Run Build Script # We set the Environment Variable TYPST_FONT_PATHS so Typst knows where to look env: TYPST_FONT_PATHS: ./fonts run: | chmod +x build.sh ./build.sh - name: Update Nightly Tag # This moves the 'nightly' tag to the current commit run: | git config user.name "Gitea Actions" git config user.email "actions@gitea.local" # Force create/move the tag locally git tag -f nightly # Force push the tag to the remote git push -f origin nightly - name: Publish Nightly Release uses: softprops/action-gh-release@v1 with: tag_name: nightly name: Nightly Build body: | **Automated Nightly Build** Triggered by commit: `${{ gitea.sha }}` Date: ${{ gitea.event.head_commit.timestamp }} files: build/*.pdf prerelease: true draft: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}