Compare commits
10 Commits
main
...
ci/gitea-r
Author | SHA1 | Date |
---|---|---|
Sven Vogel | cc4d217547 | |
Sven Vogel | 84af717ce7 | |
Sven Vogel | c961dacf96 | |
Sven Vogel | c819704b49 | |
Sven Vogel | 6695c5e204 | |
Sven Vogel | fe9fa2e614 | |
Sven Vogel | e77de7aec5 | |
Sven Vogel | 1567c6212c | |
Sven Vogel | 5dece112cb | |
Sven Vogel | 4c55b9cc7f |
|
@ -2,9 +2,6 @@ name: Build'n check
|
||||||
run-name: Performing Typst compilation
|
run-name: Performing Typst compilation
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
jobs:
|
jobs:
|
||||||
run-ci-linux:
|
run-ci-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -12,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
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
name: Build'n check
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Check Template and Build example
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Install dependencies for Nix setup action
|
||||||
|
run: |
|
||||||
|
apt update -y
|
||||||
|
apt install sudo -y
|
||||||
|
- name: Setup Nix
|
||||||
|
uses: cachix/install-nix-action@v27
|
||||||
|
with:
|
||||||
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
|
- name: Stylecheck
|
||||||
|
run: nix-shell --run "./run-fmt.sh --check src/lib.typ"
|
||||||
|
- id: build
|
||||||
|
name: Build
|
||||||
|
run: |
|
||||||
|
nix-shell --run ./run-ci.sh
|
||||||
|
- name: Upload artifact
|
||||||
|
id: artifact-upload
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: example-document
|
||||||
|
path: ${{ github.workspace }}/example.pdf
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
- name: Output artifact ID
|
||||||
|
run: echo 'Artifact ID is ${{ steps.artifact-upload.outputs.artifact-id }}'
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: contains(github.event.head_commit.message, 'Release-As:')
|
||||||
|
env:
|
||||||
|
USERNAME: servostar
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Setup go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '>=1.20.1'
|
||||||
|
- name: Download Artifact
|
||||||
|
id: download
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: example-document
|
||||||
|
path: ${{ github.workspace }}/Example.pdf
|
||||||
|
- name: 'Artifact Download Path'
|
||||||
|
run: echo ${{ steps.download.outputs.download-path }}
|
||||||
|
- name: Prepare Release
|
||||||
|
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
|
||||||
|
id: create-release
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
Example.pdf
|
||||||
|
Release.txt
|
||||||
|
Version.txt
|
||||||
|
LICENSE
|
||||||
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
|
@ -9,5 +9,6 @@ pkgs.mkShellNoCC {
|
||||||
python312Packages.pyyaml
|
python312Packages.pyyaml
|
||||||
typst
|
typst
|
||||||
typstyle
|
typstyle
|
||||||
|
ripgrep
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,46 +200,49 @@ SOFTWARE.*/
|
||||||
#block(
|
#block(
|
||||||
below: 1.5em,
|
below: 1.5em,
|
||||||
width: 100%,
|
width: 100%,
|
||||||
par(hanging-indent: 1em, align(left)[
|
par(
|
||||||
#text(weight: "bold", entry.short)
|
hanging-indent: 1em,
|
||||||
#if hasLong and hasDesc [
|
align(left)[
|
||||||
(#text(entry.long))
|
#text(weight: "bold", entry.short)
|
||||||
] else if hasLong {
|
#if hasLong and hasDesc [
|
||||||
text(entry.long)
|
(#text(entry.long))
|
||||||
}
|
] else if hasLong {
|
||||||
#if hasDesc [ #sym.dash.en ]
|
text(entry.long)
|
||||||
#if hasDesc [ #desc ]
|
}
|
||||||
#if disable-back-references != true {
|
#if hasDesc [ #sym.dash.en ]
|
||||||
term_references
|
#if hasDesc [ #desc ]
|
||||||
.map(x => x.location())
|
#if disable-back-references != true {
|
||||||
.sorted(key: x => x.page())
|
term_references
|
||||||
.fold(
|
.map(x => x.location())
|
||||||
(values: (), pages: ()),
|
.sorted(key: x => x.page())
|
||||||
((values, pages), x) => if pages.contains(
|
.fold(
|
||||||
x.page(),
|
(values: (), pages: ()),
|
||||||
) {
|
((values, pages), x) => if pages.contains(
|
||||||
(values: values, pages: pages)
|
x.page(),
|
||||||
} else {
|
) {
|
||||||
values.push(x)
|
(values: values, pages: pages)
|
||||||
pages.push(x.page())
|
} else {
|
||||||
(values: values, pages: pages)
|
values.push(x)
|
||||||
},
|
pages.push(x.page())
|
||||||
)
|
(values: values, pages: pages)
|
||||||
.values
|
},
|
||||||
.map(x => {
|
)
|
||||||
let page-numbering = x.page-numbering()
|
.values
|
||||||
if page-numbering == none {
|
.map(x => {
|
||||||
page-numbering = "1"
|
let page-numbering = x.page-numbering()
|
||||||
|
if page-numbering == none {
|
||||||
|
page-numbering = "1"
|
||||||
|
}
|
||||||
|
link(x)[#numbering(
|
||||||
|
page-numbering,
|
||||||
|
..counter(page).at(x),
|
||||||
|
)]
|
||||||
}
|
}
|
||||||
link(x)[#numbering(
|
)
|
||||||
page-numbering,
|
.join(", ")
|
||||||
..counter(page).at(x),
|
}
|
||||||
)]
|
],
|
||||||
}
|
),
|
||||||
)
|
|
||||||
.join(", ")
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue