Merge pull request #3374 from getchoo-contrib/ci/fix-nix-out-paths

Fix Nix workflow
This commit is contained in:
Seth Flynn 2025-02-02 17:18:03 -05:00 committed by GitHub
commit f9dcc31843
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -77,54 +77,16 @@ jobs:
run: |
nix flake check --print-build-logs --show-trace
- name: Select debug package
- name: Build debug package
if: ${{ env.DEBUG }}
run: |
echo "installable='.#prismlauncher-debug'" >> "$GITHUB_ENV"
- name: Select release package
if: ${{ !env.DEBUG }}
run: |
echo "installable='.#prismlauncher'" >> "$GITHUB_ENV"
- name: Build package
run: |
nix build \
--no-link --print-build-logs --print-out-paths \
"$installable" >> "$RUNNER_TEMP"/out-paths
.#prismlauncher-debug >> "$GITHUB_STEP_SUMMARY"
- name: Upload out paths
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.system }}-out-paths
path: ${{ runner.temp }}/out-paths
release-gate:
name: Release gate
if: ${{ always() }}
needs: [ build ]
runs-on: ubuntu-22.04
steps:
- name: Recover out paths
uses: actions/download-artifact@v4
- name: Make job summary
- name: Build release package
if: ${{ !env.DEBUG }}
run: |
{
for artifact in *-out-paths/; do
basename="$(basename "$artifact")"
echo "# ${basename/%-out-paths/}"
echo
echo '```'
cat "$artifact"/out-paths
echo '```'
echo
done
} >>"$GITHUB_STEP_SUMMARY"
- name: Exit with error
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1
nix build \
--no-link --print-build-logs --print-out-paths \
.#prismlauncher >> "$GITHUB_STEP_SUMMARY"