diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..5f8917c --- /dev/null +++ b/.github/workflows/build.yaml @@ -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 \ No newline at end of file