-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.16 KB
/
build-pdf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build PDF
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main, release**]
# Allows us to run the workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-pdf:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- run: nix build ./report
- name: Tag the repository
id: tag
run: |
# See https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
TAG=v$(date -u '+%Y-%m-%d_%H-%M-%S_%Z')
echo "$TAG"
echo "tag=$TAG" >> $GITHUB_OUTPUT
git tag -a $TAG -m "Published version $TAG" ${GITHUB_SHA}
git push origin $TAG
- name: Release
uses: softprops/action-gh-release@v2
with:
files: result/report.pdf
tag_name: ${{ steps.tag.outputs.tag }}