Skip to content

Commit 3887638

Browse files
committed
Add GHA workflow
1 parent a889082 commit 3887638

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and release PDF
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
release:
17+
runs-on: ubuntu-24.04
18+
timeout-minutes: 30
19+
steps:
20+
- name: Check out the source
21+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
22+
with:
23+
persist-credentials: false
24+
25+
- name: Set up mkosi
26+
uses: systemd/mkosi@ecf7f5702bb2052b7a69cab3fe7d37bc3b9ad77b # v27.1
27+
28+
- name: Build the PDF
29+
run: mkosi build
30+
31+
- name: Publish the release
32+
env:
33+
GH_TOKEN: ${{ github.token }}
34+
GH_REPO: ${{ github.repository }}
35+
run: |
36+
version="$(date -u +'%Y-%m-%d-%H-%M')"
37+
gh release create "$version" mkosi.output/form.pdf \
38+
--target "$GITHUB_SHA" \
39+
--title "$version" \
40+
--notes "PDF built from commit $GITHUB_SHA."

0 commit comments

Comments
 (0)