-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (44 loc) · 1.49 KB
/
release.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Nix CD
on:
push:
branches:
- "master"
concurrency:
group: "master"
cancel-in-progress: true
jobs:
check:
name: "Publish Stable Release"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check
run: |
nix flake check --print-build-logs -j auto
- name: "Determine release"
id: det-rel
run: |
version=$(nix eval .#packages.x86_64-linux.default.version --raw)
if [ $(git tag -l "v$version") ]; then
echo "releasever=none" >> $GITHUB_OUTPUT
else
echo "releasever=$version" >> $GITHUB_OUTPUT
fi
- name: "Build Release"
if: steps.det-rel.outputs.releasever != 'none'
run: |
nix build .# --print-build-logs -j auto
nix build .#latency-slider-de-classic --print-build-logs -j auto -o result-classic
- name: "Publish Release"
if: steps.det-rel.outputs.releasever != 'none'
uses: ncipollo/[email protected]
with:
artifacts: "result/lib/*.nro,result-classic/lib/*.nro"
bodyFile: ".github/release_notes/v${{ steps.det-rel.outputs.releasever }}.md"
name: "v${{ steps.det-rel.outputs.releasever }}"
commit: "${{ github.sha }}"
tag: "v${{ steps.det-rel.outputs.releasever }}"