Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
MrToWy committed Feb 28, 2024
1 parent 37cc7ae commit 361050d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Compile and publish PDF
on: [push, workflow_dispatch]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Compile PDF
uses: lvignoli/typst-action@main
with:
source_file: |
main.typ
- name: Upload PDF
uses: actions/upload-artifact@v3
with:
name: BachelorThesis
path: main.pdf

- name: Get current date
id: date
run: echo "DATE=$(date +%Y-%m-%d-%H:%M)" >> $GITHUB_ENV

- name: Create Release
uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
name: "${{ github.ref_name }} — ${{ env.DATE }}"
files: main.pdf

0 comments on commit 361050d

Please sign in to comment.