-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.3 KB
/
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
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
name: Build
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_call:
workflow_dispatch:
jobs:
build:
permissions:
id-token: write
attestations: write
strategy:
matrix:
target:
- aarch64-apple-darwin
- x86_64-apple-darwin
include:
- target: aarch64-apple-darwin
system: aarch64-darwin
- target: x86_64-apple-darwin
system: x86_64-darwin
fail-fast: false
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build
run: nix build --fallback --print-build-logs '.#packages.${{ matrix.system }}.morlana'
- name: Generate build provenance attestations
uses: actions/attest-build-provenance@v2
if: ${{ github.event_name != 'pull_request' }}
with:
subject-path: ./result/bin/morlana
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
if-no-files-found: "error"
name: morlana-${{ matrix.system }}
path: ./result/bin/morlana