ci: fixup upload-artifact action #506
Workflow file for this run
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 artifacts | |
on: | |
workflow_dispatch: | |
workflow_call: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
build-artifacts-X64-Linux: | |
runs-on: UbuntuLatest32Cores128G | |
permissions: | |
id-token: "write" | |
contents: "read" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: DeterminateSystems/flake-checker-action@main | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
with: | |
use-gha-cache: false | |
- name: "Nix formatting" | |
run: git ls-files '*.nix' | nix develop --command xargs nixpkgs-fmt --check | |
- name: "Rust formatting" | |
run: nix develop --command cargo fmt --check | |
- name: "Clippy" | |
run: nix develop --command cargo clippy --all-targets --all-features -- -Dwarnings | |
- name: "Nix Flake Check" | |
run: nix flake check --all-systems --print-build-logs | |
- name: Build package | |
run: "nix build .# -L --fallback" | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
# Artifact name | |
name: flakehub-push-X64-Linux | |
path: result/bin/flakehub-push | |
retention-days: 1 | |
# For local development purposes | |
build-artifacts-macos: | |
runs-on: ${{ matrix.systems.runner }} | |
permissions: | |
id-token: "write" | |
contents: "read" | |
strategy: | |
matrix: | |
systems: | |
- nix-system: aarch64-darwin | |
runner: macos-latest-xlarge | |
- nix-system: x86_64-darwin | |
runner: macos-12 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
with: | |
use-gha-cache: false | |
- name: Build package | |
run: "nix build .# -L --fallback" |