Skip to content

build: update dependencies and inputs #61

build: update dependencies and inputs

build: update dependencies and inputs #61

Workflow file for this run

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: Build
id: build
run: |
out_path="$(nix build -L --show-trace --print-out-paths '.#packages.${{ matrix.system }}.morlana')"
echo "out_path=$out_path" >> "$GITHUB_OUTPUT"
- name: Push to Cachix
uses: cachix/cachix-action@v15
with:
name: ryanccn
pathsToPush: "${{ steps.build.outputs.out_path }}"
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- 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