Compare commits

..

10 Commits

Author SHA1 Message Date
Sven Vogel cc4d217547 ci: remove run condition for CI on push on main
Build'n check / run-ci-linux (push) Has been skipped Details
Build'n check / Check Template and Build example (pull_request) Successful in 2m38s Details
Build'n check / release (pull_request) Has been skipped Details
2024-11-25 10:33:12 +01:00
Sven Vogel 84af717ce7 style: run formatter 2024-11-25 10:31:47 +01:00
Sven Vogel c961dacf96 ci: add ripgrep to nix shell 2024-11-25 10:31:30 +01:00
Sven Vogel c819704b49 ci: revert artifact up- and download action to v3
Build'n check / run-ci-linux (push) Has been skipped Details
2024-11-25 10:27:46 +01:00
Sven Vogel 6695c5e204 ci: tag release commit
Build'n check / run-ci-linux (push) Has been skipped Details
Build'n check / run-ci-linux (pull_request) Successful in 2m39s Details
Build'n check / Check Template and Build example (pull_request) Failing after 2m32s Details
Build'n check / release (pull_request) Has been skipped Details
2024-11-25 10:11:11 +01:00
Sven Vogel fe9fa2e614 ci: run release job when release message is present 2024-11-25 10:10:55 +01:00
Sven Vogel e77de7aec5 ci: run release on PR 2024-11-25 10:10:33 +01:00
Sven Vogel 1567c6212c style: fix spelling mistake in CI 2024-11-25 09:11:31 +01:00
Sven Vogel 5dece112cb ci: bump artifact actions to v4 2024-11-25 09:11:08 +01:00
Sven Vogel 4c55b9cc7f ci: draft release pipeline 2024-11-25 09:10:49 +01:00
9 changed files with 48 additions and 109 deletions

View File

@ -1,13 +1,7 @@
name: Build'n check name: Build'n check
run-name: Performing Typst compilation run-name: Performing Typst compilation
on: on:
pull_request:
branches:
- main
push: push:
branches-ignore:
- main
jobs: jobs:
run-ci-linux: run-ci-linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -15,8 +9,7 @@ jobs:
# push with commit containing "Run-Checks" # push with commit containing "Run-Checks"
if: > if: >
(contains(github.event.head_commit.message, 'Run-Checks') && (contains(github.event.head_commit.message, 'Run-Checks') &&
github.event_name == 'push') || github.event_name == 'push')
github.event_name == 'pull_request'
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -1,38 +0,0 @@
name: Create Release Commit
on:
push:
branches:
- main
tags-ignore:
- v*.*.*
jobs:
prepare:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'Release-As:')
env:
USERNAME: servostar
EMAIL: sven.vogel123@web.de
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
ref: 'main'
token: ${{ secrets.RELEASE_TOKEN }}
- name: Tag Release Commit
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
GIT_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
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
git add typst.toml
git commit -m "chore: bump release version to $VERSION" -m "Generated-By: ${{ gitea.actor }}"
git push origin main
echo "::endgroup::"
echo "::group::{Tag commit}"
git tag -m "Release" "${VERSION}"
git push origin "${VERSION}"
echo "::endgroup::"

View File

@ -1,8 +1,10 @@
name: Create Release name: Build'n check
on: on:
push: pull_request:
tags: branches:
- 'v[0-9]+.[0-9]+.[0-9]+' - main
types:
- closed
jobs: jobs:
build: build:
name: Check Template and Build example name: Check Template and Build example
@ -37,6 +39,9 @@ jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
if: contains(github.event.head_commit.message, 'Release-As:')
env:
USERNAME: servostar
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -54,6 +59,14 @@ jobs:
run: echo ${{ steps.download.outputs.download-path }} run: echo ${{ steps.download.outputs.download-path }}
- name: Prepare Release - name: Prepare Release
run: echo ${{ github.sha }} > Release.txt run: echo ${{ github.sha }} > Release.txt
- name: Tag Release Commit
run: |
echo ${{github.event.head_commit.message}} | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+' > Version.txt
echo "==> Tagging for version: $(cat Version.txt)"
git config --global credential.helper store
echo "https://${USERNAME}:${{secrets.RELEASE_TOKEN}}}@${{github.repositoryUrl}}" > ~/.git-credentials
git tag -m "Release" $(cat Version.txt)
git push ${{github.repositoryUrl}} $(cat Version.txt)
- name: Create release - name: Create release
id: create-release id: create-release
uses: https://gitea.com/actions/release-action@main uses: https://gitea.com/actions/release-action@main
@ -61,5 +74,6 @@ jobs:
files: |- files: |-
Example.pdf Example.pdf
Release.txt Release.txt
Version.txt
LICENSE LICENSE
api_key: '${{secrets.RELEASE_TOKEN}}' api_key: '${{secrets.RELEASE_TOKEN}}'

View File

@ -1,17 +0,0 @@
# Contributing
Development of this template happens at
[git.montehaselino.de](https://git.montehaselino.de/DHBW/dhbw-abb-typst-template).
For this reason pull request opened at any mirror such as on GitHub, will not be
merged as this would compromise the push mirror.
Pull requests shall be opened exclusively in the official
[repository](https://git.montehaselino.de/DHBW/dhbw-abb-typst-template).
Issues may be created at GitHub or the official repository.
Beware, that linked pull requests and issues in commits messages refer to those
in the official instance and may be broken or invalid on mirrors such as GitHub.
Direct pushes to the `main` branch are discouraged. In order to make a change
create a new pull request and wait for a maintainer to merge it. Note that in
order to be able to merge, the continuous integration pipeline must run
successfully.

View File

@ -2,7 +2,7 @@
<div align="center"> <div align="center">
<h1>DHBW-ABB template for Typst</h1> <h1>DHBW-ABB template for Typst</h1>
<img src="https://img.shields.io/gitea/last-commit/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de"> <img src="https://img.shields.io/gitea/last-commit/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de">
<img src="https://img.shields.io/github/actions/workflow/status/Servostar/dhbw-abb-typst-template/release.yml?label=build"> <img src="https://img.shields.io/github/actions/workflow/status/Servostar/dhbw-abb-typst-template/ci.yml?label=build">
<img src="https://img.shields.io/gitea/v/release/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de&display_name=release"> <img src="https://img.shields.io/gitea/v/release/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de&display_name=release">
<img src="https://img.shields.io/badge/license-MIT-ff0000"> <img src="https://img.shields.io/badge/license-MIT-ff0000">
<img src="https://img.shields.io/badge/Typst-2B9CB0"> <img src="https://img.shields.io/badge/Typst-2B9CB0">

View File

@ -24,7 +24,6 @@
name: "dualen Hochschule Baden-Württemberg", name: "dualen Hochschule Baden-Württemberg",
campus: "Eppelheim" campus: "Eppelheim"
), ),
supervisor-signature: false,
authors: ( authors: (
( (
name: "Sven Vogel", name: "Sven Vogel",

View File

@ -122,27 +122,17 @@
#metadata("content terminate") <end-of-content> #metadata("content terminate") <end-of-content>
#end_styled( #end_styled(config)[
config, // add bibliography if set
context [ #if "bibliography" in config.thesis and config.thesis.bibliography != none {
// add bibliography if set pagebreak(weak: true)
#if "bibliography" in config.thesis and config.thesis.bibliography != none { counter(page).update(1)
pagebreak(weak: true) set bibliography(style: "ieee")
counter(page).update(1) config.thesis.bibliography
set bibliography( }
style: "ieee",
title: if (text.lang == "de") {
"Literaturverzeichnis"
} else if text.lang == "en" {
"Bibliography"
},
)
config.thesis.bibliography
}
// appendix // appendix
#show-appendix(config: config) #show-appendix(config: config)
], ]
)
] ]
] ]

View File

@ -147,24 +147,22 @@
#context panic("no translation for language: ", text.lang) #context panic("no translation for language: ", text.lang)
] ]
#if config.supervisor-signature { #align(
align( bottom,
bottom, grid(
grid( // set width of columns
// set width of columns // we need two, so make both half the page width
// we need two, so make both half the page width columns: (60%, 40%),
columns: (60%, 40%), align(left, if text.lang == "de" [
align(left, if text.lang == "de" [ Unterschrift des betrieblichen Betreuers
Unterschrift des betrieblichen Betreuers ] else if text.lang == "en" [
] else if text.lang == "en" [ Signature of the company supervisor
Signature of the company supervisor ] else [
] else [ #context panic("no translation for language: ", text.lang)
#context panic("no translation for language: ", text.lang) ]
] ),
), align(right, {line(length: 6cm)})),
align(right, {line(length: 6cm)})), )
)
}
#counter(page).update(0) #counter(page).update(0)
] ]

View File

@ -1,6 +1,6 @@
[package] [package]
name = "dhbw-abb-typst-template" name = "dhbw-abb-typst-template"
version = "0.5.4" version = "0.4.1"
entrypoint = "src/template.typ" entrypoint = "src/template.typ"
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"] authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
license = "MIT" license = "MIT"