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

View File

@ -8,28 +8,6 @@ permissions:
contents: read contents: read
jobs: 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: winget:
name: Winget name: Winget