Upload Nix closure

This commit is contained in:
Eelco Dolstra 2024-01-09 12:13:41 +01:00
parent d73bb0a676
commit 345fd479ed

View file

@ -20,14 +20,14 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@main - uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build package - name: Build package
run: "nix build .# -L --fallback" run: "nix build .# -L --fallback && nix-store --export $(nix-store -qR ./result) | xz -9 > magic-nix-cache.closure.xz"
- name: Upload a Build Artifact - name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2 uses: actions/upload-artifact@v3.1.2
with: with:
# Artifact name # Artifact name
name: magic-nix-cache-ARM64-macOS name: magic-nix-cache-ARM64-macOS.closure.xz
path: result/bin/magic-nix-cache path: magic-nix-cache.closure.xz
retention-days: 1 retention-days: 1
build-artifacts-X64-macOS: build-artifacts-X64-macOS:
@ -47,14 +47,14 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@main - uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build package - name: Build package
run: "nix build .# -L --fallback" run: "nix build .# -L --fallback && nix-store --export $(nix-store -qR ./result) | xz -9 > magic-nix-cache.closure.xz"
- name: Upload a Build Artifact - name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2 uses: actions/upload-artifact@v3.1.2
with: with:
# Artifact name # Artifact name
name: magic-nix-cache-X64-macOS name: magic-nix-cache-X64-macOS.closure.xz
path: result/bin/magic-nix-cache path: magic-nix-cache.closure.xz
retention-days: 1 retention-days: 1
build-artifacts-X64-Linux: build-artifacts-X64-Linux:
@ -74,12 +74,12 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action-priv@main - uses: DeterminateSystems/magic-nix-cache-action-priv@main
- name: Build package - name: Build package
run: "nix build .# -L --fallback" run: "nix build .# -L --fallback && nix-store --export $(nix-store -qR ./result) | xz -9 > magic-nix-cache.closure.xz"
- name: Upload a Build Artifact - name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2 uses: actions/upload-artifact@v3.1.2
with: with:
# Artifact name # Artifact name
name: magic-nix-cache-X64-Linux name: magic-nix-cache-X64-Linux.closure.xz
path: result/bin/magic-nix-cache path: magic-nix-cache.closure.xz
retention-days: 1 retention-days: 1