Compare commits

..

No commits in common. "1f031c050f8d1d613e0087fad250b9b7bb2e8562" and "2cc6ea93a8d6d00a94013cccb4e66968a24fbabe" have entirely different histories.

5 changed files with 13 additions and 71 deletions

View File

@ -12,44 +12,27 @@ jobs:
env: env:
USERNAME: servostar USERNAME: servostar
EMAIL: sven.vogel123@web.de EMAIL: sven.vogel123@web.de
GIT_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: 'main' ref: 'main'
token: ${{ secrets.RELEASE_TOKEN }} token: ${{ secrets.RELEASE_TOKEN }}
- name: Install dependencies for Nix setup action - name: Tag Release Commit
run: | env:
apt update -y COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
apt install sudo -y GIT_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Setup Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Setup Git
run: |
git config --global user.name "${USERNAME}"
git config --global user.email "${EMAIL}"
- name: Update Typst.toml
run: | run: |
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+') export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
git config --global user.name "${USERNAME}"
git config --global user.email "${EMAIL}"
echo "==> Update typst.toml version"
sed -i "/version/c\version = \"${VERSION#v}\"" typst.toml sed -i "/version/c\version = \"${VERSION#v}\"" typst.toml
git add typst.toml git add typst.toml
git commit -m "chore: bump release version to $VERSION" -m "Generated-By: ${{ gitea.actor }}" git commit -m "chore: bump release version to $VERSION" -m "Generated-By: ${{ gitea.actor }}"
- name: Generate Example Document
run: nix-shell --run ./run-ci.sh
- name: Generate Assets
if: contains(github.event.head_commit.message, 'Generate-Assets')
run: |
./run-bake-assets.sh
git add assets/banner.png
git add assets/page-preview.png
git commit -m "chore: update assets" -m "Generated-By: ${{ gitea.actor }}"
- name: Tag and Push Changes
run: |
git push origin main git push origin main
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+') echo "::endgroup::"
echo "::group::{Tag commit}"
git tag -m "Release" "${VERSION}" git tag -m "Release" "${VERSION}"
git push origin "${VERSION}" git push origin "${VERSION}"
echo "::endgroup::"

View File

@ -1,34 +0,0 @@
#let gap = 0.5cm
#set page(margin: 0pt, width: 210mm * 3 + 2 * gap, height: 297mm * 2 + gap, fill: rgb(0, 0, 0, 0))
#place(
dx: 0mm,
dy: 0mm,
image("./images/11.svg", height: 297mm))
#place(
dx: 210mm + gap,
dy: 0mm,
image("./images/21.svg", height: 297mm))
#place(
dx: (210mm + gap) * 2,
dy: 0mm,
image("./images/31.svg", height: 297mm))
#place(
dx: 210mm * 0,
dy: 297mm + gap,
image("./images/71.svg", height: 297mm))
#place(
dx: (210mm + gap) * 1,
dy: 297mm + gap,
image("./images/41.svg", height: 297mm))
#place(
dx: (210mm + gap) * 2,
dy: 297mm + gap,
image("./images/51.svg", height: 297mm))

View File

@ -1,18 +1,12 @@
#!/bin/bash #!/bin/bash
echo "==> generate images" mkdir images
mkdir images || true
# extract images from document created by action # extract images from document created by action
mutool convert -o images/1.svg "$1" 1 mutool convert -o images/1.svg "$1" 1
mutool convert -o images/2.svg "$1" 2 mutool convert -o images/2.svg "$1" 2
mutool convert -o images/2.svg "$1" 2
mutool convert -o images/3.svg "$1" 5 mutool convert -o images/3.svg "$1" 5
mutool convert -o images/7.svg "$1" 7
mutool convert -o images/4.svg "$1" 15 mutool convert -o images/4.svg "$1" 15
mutool convert -o images/5.svg "$1" 16 mutool convert -o images/5.svg "$1" 16
echo "==> generate banner" typst compile banner.typ --ppi 220 ../assets/banner.png
typst compile banner.typ --ppi 360 ../assets/banner.png
echo "==> generate preview"
typst compile preview.typ --ppi 360 ../assets/page-preview.png

View File

@ -2,5 +2,5 @@
cd baker cd baker
echo "==> generate assets" echo "==> generate banner image"
nix-shell --run "./run-bake-banner.sh ../example.pdf" nix-shell --run "./run-bake-banner.sh ../example.pdf"

View File

@ -241,7 +241,6 @@
set page( set page(
paper: style.page.format, paper: style.page.format,
foreground: watermark(config), foreground: watermark(config),
background: [#rect(width: 100%, height: 100%, fill: white)],
header-ascent: style.header.content-padding, header-ascent: style.header.content-padding,
footer-descent: style.header.content-padding, footer-descent: style.header.content-padding,
margin: ( margin: (