File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Nix Build
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches : ["master"]
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Install nix
18
+ uses : cachix/install-nix-action@v31
19
+ with :
20
+ nix_path : nixpkgs=channel:nixos-unstable
21
+
22
+ - name : Build
23
+ id : build
24
+ run : |
25
+ nix build --accept-flake-config .#static
26
+ echo "name=$(nix derivation show ./result | jq -r .[].env.name)" >>"$GITHUB_OUTPUT"
27
+ echo "artifacts=$(find -L result -type f)" >>"$GITHUB_OUTPUT"
28
+
29
+ - name : Record system details
30
+ id : system-details
31
+ run : |
32
+ echo "system=$(uname -s)" >>"$GITHUB_OUTPUT"
33
+ echo "machine=$(uname -m)" >>"$GITHUB_OUTPUT"
34
+
35
+ - name : Upload artifacts
36
+ uses : actions/upload-artifact@v4
37
+ with :
38
+ name : ${{ steps.build.outputs.name }}-${{ steps.system-details.outputs.system }}-${{ steps.system-details.outputs.machine }}
39
+ path : ${{ steps.build.outputs.artifacts }}
You can’t perform that action at this time.
0 commit comments