init Vorlage
This commit is contained in:
30
.gitea/workflows/build.yml
Normal file
30
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Build Typst PDF
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Typst
|
||||
run: |
|
||||
curl -L https://github.com/typst/typst/releases/latest/download/typst-x86_64-unknown-linux-musl.tar.xz \
|
||||
| tar -xJ --strip-components=1 -C /usr/local/bin typst-x86_64-unknown-linux-musl/typst
|
||||
|
||||
- name: Build PDF
|
||||
run: typst compile main.typ main.pdf
|
||||
|
||||
- name: Upload PDF artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: projektarbeit-pdf
|
||||
path: main.pdf
|
||||
retention-days: 30
|
||||
29
.gitea/workflows/release.yml
Normal file
29
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Release Typst PDF
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Typst
|
||||
run: |
|
||||
curl -L https://github.com/typst/typst/releases/latest/download/typst-x86_64-unknown-linux-musl.tar.xz \
|
||||
| tar -xJ --strip-components=1 -C /usr/local/bin typst-x86_64-unknown-linux-musl/typst
|
||||
|
||||
- name: Build PDF
|
||||
run: typst compile main.typ projektarbeit-${{ github.ref_name }}.pdf
|
||||
|
||||
- name: Create Release and Upload PDF
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: projektarbeit-${{ github.ref_name }}.pdf
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user