Build package and release #20
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 installer package | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v*.*" | |
jobs: | |
build: | |
runs-on: | |
labels: oc-runner | |
permissions: | |
id-token: "write" | |
contents: "write" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
with: | |
use-flakehub: false | |
diagnostic-endpoint: "" | |
- name: Decrypt Secrets | |
run: nix run .#decrypt -- ${{ secrets.GIT_CRYPT_KEY }} | |
- name: Build package | |
run: nix build -L .#installerPackage | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nixos-asahi-${{ github.ref_name }} | |
path: result/nixos-asahi-*.zip | |
overwrite: true | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: result/nixos-asahi-*.zip | |
- name: Upload to CDN | |
if: startsWith(github.ref, 'refs/tags/') | |
run: nix run .#upload |