-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (58 loc) · 1.68 KB
/
cabal-audit.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Build cabal-audit
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build cabal-audit and Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Set up cachix
uses: cachix/cachix-action@v14
with:
name: cabal-audit
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Check flake
run: |
nix -Lv flake check
- name: Build cabal-audit
run: |
nix -Lv build
- name: Build cabal-audit docker image
run: |
nix -Lv build .#cabal-audit-docker -o result-docker
- name: Create release artifacts
run: |
mkdir -p artifacts
cp result/bin/cabal-audit artifacts
chmod +x artifacts/cabal-audit
cp result-docker artifacts/cabal-audit-docker.tar
- name: Upload static cabal-audit exe
uses: actions/upload-artifact@v4
with:
name: cabal-audit
path: artifacts/cabal-audit
- name: Upload cabal-audit docker
uses: actions/upload-artifact@v4
with:
name: cabal-audit-docker.tar
path: artifacts/cabal-audit-docker.tar
- name: Release nightly cabal-audit exe
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
prerelease: true
tag_name: nightly
files: |
artifacts/cabal-audit
artifacts/cabal-audit-docker.tar
fail_on_unmatched_files: true