-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (44 loc) · 1.21 KB
/
ci.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
name: Test build & release
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
env:
ARTIFACT_PREFIX: tt-rss
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- run: nix build --no-update-lock-file
- run: nix flake check --no-update-lock-file
- name: Prepare artifacts
run: |
cp result/${{ env.ARTIFACT_PREFIX}}_*.raw ./
sh -c 'sha256sum $0 > $0.sha256' ${{ env.ARTIFACT_PREFIX }}_*.raw
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
retention-days: 5
path: |
${{ env.ARTIFACT_PREFIX }}_*.raw
${{ env.ARTIFACT_PREFIX }}_*.raw.sha256
name: ${{ env.ARTIFACT_PREFIX }}
- name: Release Info
run: nix build --no-update-lock-file .#release-info
- name: Create a github release from tag
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: |
${{ env.ARTIFACT_PREFIX }}_*.raw
${{ env.ARTIFACT_PREFIX }}_*.raw.sha256
body_path: result