Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
54
.gitea/workflows/main.yaml
Normal file
54
.gitea/workflows/main.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Build and Release PDF
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tag: ${{ steps.set-tag.outputs.tag }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install LaTeX (XeLaTeX)
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y texlive-xetex texlive-science texlive-fonts-extra
|
||||
|
||||
wget -P /usr/local/share/fonts https://github.com/CatharsisFonts/Cormorant/raw/refs/heads/master/fonts/ttf/CormorantGaramond-Regular.ttf
|
||||
wget -P /usr/local/share/fonts https://github.com/CatharsisFonts/Cormorant/raw/refs/heads/master/fonts/ttf/CormorantGaramond-Bold.ttf
|
||||
wget -P /usr/local/share/fonts https://github.com/CatharsisFonts/Cormorant/raw/refs/heads/master/fonts/ttf/CormorantGaramond-Italic.ttf
|
||||
wget -P /usr/local/share/fonts https://github.com/CatharsisFonts/Cormorant/raw/refs/heads/master/fonts/ttf/CormorantGaramond-BoldItalic.ttf
|
||||
wget -P /usr/local/share/fonts https://github.com/CatharsisFonts/Cormorant/raw/refs/heads/master/fonts/ttf/CormorantGaramond-Light.ttf
|
||||
fc-cache -fv
|
||||
|
||||
- name: Compile PDF
|
||||
run: |
|
||||
xelatex main.tex
|
||||
|
||||
- name: Upload PDF Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: main-pdf
|
||||
path: main.pdf
|
||||
retention-days: 1
|
||||
|
||||
- name: Tag
|
||||
run: |
|
||||
SHA="${{gitea.sha}}"
|
||||
TAG="release-$SHA"
|
||||
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||
git tag -a "$TAG" -m "Release $TAG"
|
||||
git push origin "$TAG"
|
||||
|
||||
- name: Release
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
api_key: "${{secrets.RELEASE_TOKEN}}"
|
||||
tag: ${{needs.release.outputs.tag}}
|
||||
files: |
|
||||
main.pdf
|
Reference in New Issue
Block a user