mirror of
https://github.com/kristoferssolo/Tetris.git
synced 2025-10-21 20:00:35 +00:00
refactor(gh-actions): compile and push pdf
This commit is contained in:
parent
1b3f3500ff
commit
c79bdef3b3
29
.github/workflows/typst.yml
vendored
29
.github/workflows/typst.yml
vendored
@ -1,33 +1,24 @@
|
|||||||
name: Build Typst document
|
name: Build Typst document
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["main"]
|
- main
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
jobs:
|
jobs:
|
||||||
typst-build:
|
typst-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Typst
|
- name: Build Typst
|
||||||
uses: lvignoli/typst-action@main
|
uses: lvignoli/typst-action@main
|
||||||
with:
|
with:
|
||||||
source_file: |
|
source_file: |
|
||||||
typst/main.typ
|
typst/main.typ
|
||||||
- name: Uplaoding PDF file
|
- name: Push changes
|
||||||
uses: actions/upload-artifact@v3
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
name: PDF
|
file_pattern: "typst/*.pdf"
|
||||||
path: |
|
commit_message: "chore(build): auto-build pdf"
|
||||||
typst/main.pdf
|
commit_user_name: "github-actions[bot]"
|
||||||
- name: Get current date
|
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
||||||
id: date
|
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
||||||
run: echo "DATE=$(date +%Y-%m-%d-%H:%M)" >> $GITHUB_ENV
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: github.ref_type == 'tag'
|
|
||||||
with:
|
|
||||||
name: "${{ github.ref_name }} — ${{ env.DATE }}"
|
|
||||||
files: typst/main.pdf
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user