forked from Progetto-ItaCa/libro
-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (26 loc) · 983 Bytes
/
build.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
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- run: nix build --print-build-logs
- id: tags
run: |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "ssha=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
- run: cp result/main.pdf ${{ steps.tags.outputs.date }}_${{ steps.tags.outputs.ssha }}_itaca.pdf
- uses: docker://antonyurchenko/git-release:v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: "${{ steps.tags.outputs.date }} (${{ steps.tags.outputs.ssha }})"
DRAFT_RELEASE: "false"
PRE_RELEASE: "true"
UNRELEASED: "update"
UNRELEASED_TAG: "latest"
ALLOW_EMPTY_CHANGELOG: "true"
with:
args: ${{ steps.tags.outputs.date }}_${{ steps.tags.outputs.ssha }}_itaca.pdf