Skip to content

Commit 4221580

Browse files
Moritz Jörgmrtz-j
authored andcommitted
Cleanup assignment template
Add dependabot for actions, for easier maintenance. Switch to typst community action and from switch to typstyle from typstfmt (no longer maintained).
1 parent edefc71 commit 4221580

File tree

11 files changed

+334
-110
lines changed

11 files changed

+334
-110
lines changed

.github/dependabot.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
# Check for updates to GitHub Actions every week
12+
interval: "weekly"

.github/workflows/build.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,19 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: '0'
17-
- name: Compile Typst
18-
uses: lvignoli/typst-action@main
17+
18+
- uses: typst-community/setup-typst@v3
19+
- run: typst compile ./main.typ main.pdf
20+
21+
- name: Upload Release Asset - Assignment
22+
id: upload
23+
uses: actions/upload-artifact@v4
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1926
with:
20-
source_file: |
21-
main.typ
27+
path: ./main.pdf
28+
name: main.pdf
29+
retention-days: 5

.github/workflows/release.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: '0'
1919

@@ -25,27 +25,26 @@ jobs:
2525
2626
- name: Bump version and push tag
2727
id: bump
28-
uses: anothrNick/github-tag-action@1.67.0
28+
uses: anothrNick/github-tag-action@1.70.0
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131
WITH_V: true
3232
DEFAULT_BUMP: 'patch'
3333

34+
- uses: typst-community/setup-typst@v3
35+
- run: typst compile ./main.typ main.pdf
36+
3437
- name: Create Release
3538
id: create_release
36-
uses: softprops/action-gh-release@v1
39+
uses: softprops/action-gh-release@v2
3740
with:
3841
tag_name: ${{ steps.bump.outputs.new_tag }}
3942
name: Version ${{ steps.bump.outputs.new_tag }}
4043
draft: false
4144
prerelease: false
45+
files: |
46+
main.pdf
4247
43-
- name: Compile Typst
44-
uses: lvignoli/typst-action@main
45-
with:
46-
source_file: |
47-
main.typ
48-
4948
- name: Upload Release Asset - Assignment
5049
uses: actions/upload-release-asset@v1
5150
env:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ result
44

55
# Output
66
*.pdf
7+
8+
# Git Hook
9+
.pre-commit-config.yaml

.vscode/extensions.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Fill in your assignment details in the `uit_template` function, it should contai
3434

3535
Once you have installed Typst, you can use it like this:
3636

37-
```console
37+
```bash
3838
# Creates `main.pdf` in working directory.
3939
typst compile main.typ
4040

@@ -45,18 +45,17 @@ typst compile main.typ path/to/output.pdf
4545
You can also watch source files and automatically recompile on changes. This is
4646
faster than compiling from scratch each time because Typst has incremental compilation.
4747

48-
```console
48+
```bash
4949
# Watches source files and recompiles on changes.
5050
typst watch main.typ
5151
```
5252

53-
If the `typstfmt` is installed, then the text can be formatted using:
53+
If the `typstyle` is installed, then the text can be formatted using:
5454

55-
```console
56-
typstfmt main.typ
55+
```bash
56+
typstyle main.typ
5757
```
5858

59-
6059
### Working in the Typst Web Editor
6160

6261
If you prefer an Overleaf-like experience with autocompletion, preview and (soon)spellchecking, then the Typst web editor is for you. It allows you to import files directly into a new or existing document. Here's a step-by-step guide:

flake.lock

Lines changed: 174 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)