Merge pull request #151 from DeterminateSystems/document-more-commands #589
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build fh artifacts | |
on: | |
workflow_call: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
build-artifacts: | |
runs-on: ${{ matrix.systems.runner }} | |
permissions: | |
id-token: "write" | |
contents: "read" | |
strategy: | |
matrix: | |
systems: | |
- nix-system: "aarch64-darwin" | |
runner: "macos-latest-xlarge" | |
artifact: "fh-ARM64-macOS" | |
- nix-system: "x86_64-darwin" | |
runner: "macos-14-large" | |
artifact: "fh-X64-macOS" | |
- nix-system: "aarch64-linux" | |
runner: "namespace-profile-default-arm64" | |
artifact: "fh-X64-Linux" | |
- nix-system: "x86_64-linux" | |
runner: "ubuntu-22.04" | |
artifact: "fh-ARM64-linux" | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Set up Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
with: | |
use-flakehub: true | |
- name: Build package for ${{ matrix.systems.nix-system }} | |
run: | | |
nix build -L ".#packages.${{ matrix.systems.nix-system }}.default" | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
# Artifact name | |
name: ${{ matrix.systems.artifact }} | |
path: result/bin/fh | |
retention-days: 1 |