Fix Nix release CI (#3594)

This commit is contained in:
Seth Flynn 2025-04-07 09:13:23 -04:00 committed by GitHub
commit 4995bdcad6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 36 deletions

View File

@ -2,19 +2,30 @@ name: Nix
on:
push:
tags:
- "*"
paths-ignore:
- ".github/**"
- "!.github/workflows/nix.yml"
- "flatpak/"
- "scripts/"
- ".git*"
- ".envrc"
- "**.md"
- "**/LICENSE"
- ".github/ISSUE_TEMPLATE/**"
- ".markdownlint**"
- "flatpak/**"
- "!COPYING.md"
- "renovate.json"
pull_request_target:
paths-ignore:
- ".github/**"
- "flatpak/"
- "scripts/"
- ".git*"
- ".envrc"
- "**.md"
- "**/LICENSE"
- ".github/ISSUE_TEMPLATE/**"
- ".markdownlint**"
- "flatpak/**"
- "!COPYING.md"
- "renovate.json"
workflow_dispatch:
permissions:
@ -60,7 +71,7 @@ jobs:
# For PRs
- name: Setup Nix Magic Cache
if: ${{ env.USE_DETERMINATE }}
if: ${{ env.USE_DETERMINATE == 'true' }}
uses: DeterminateSystems/flakehub-cache-action@v1
# For in-tree builds
@ -76,15 +87,18 @@ jobs:
nix flake check --print-build-logs --show-trace
- name: Build debug package
if: ${{ env.DEBUG }}
if: ${{ env.DEBUG == 'true' }}
run: |
nix build \
--no-link --print-build-logs --print-out-paths \
.#prismlauncher-debug >> "$GITHUB_STEP_SUMMARY"
- name: Build release package
if: ${{ !env.DEBUG }}
if: ${{ env.DEBUG == 'false' }}
env:
TAG: ${{ github.ref_name }}
SYSTEM: ${{ matrix.system }}
run: |
nix build \
--no-link --print-build-logs --print-out-paths \
.#prismlauncher >> "$GITHUB_STEP_SUMMARY"
nix build --no-link --print-out-paths .#prismlauncher \
| tee -a "$GITHUB_STEP_SUMMARY" \
| xargs cachix pin prismlauncher "$TAG"-"$SYSTEM"

View File

@ -8,28 +8,6 @@ permissions:
contents: read
jobs:
flakehub:
name: FlakeHub
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Install Nix
uses: cachix/install-nix-action@v31
- name: Publish on FlakeHub
uses: determinatesystems/flakehub-push@v5
with:
visibility: "public"
winget:
name: Winget