fix(ci): defer full Nix build until release

This commit is contained in:
t8y2
2026-07-22 17:20:16 +08:00
parent c180c40b36
commit 697b7a4b80
4 changed files with 24 additions and 12 deletions
+3 -7
View File
@@ -286,8 +286,8 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
- name: Build Nix package
run: nix build .#dbx-desktop --no-link --print-build-logs
- name: Validate pnpm dependency hash
run: nix build .#dbx-pnpm-deps --no-link --print-build-logs
changes:
runs-on: ubuntu-22.04
@@ -340,17 +340,13 @@ jobs:
agents:
- 'agents/**'
nix:
# The fixed-output pnpm hash must change whenever the workspace dependency graph changes.
# This fast check validates only the fixed-output pnpm dependency closure.
- 'package.json'
- 'packages/**/package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'flake.nix'
- 'flake.lock'
- 'Cargo.toml'
- 'Cargo.lock'
- 'crates/**/Cargo.toml'
- 'src-tauri/Cargo.toml'
- '.github/workflows/ci.yml'
- '.github/workflows/update-nix-pnpm-hash.yml'
+13 -1
View File
@@ -14,6 +14,17 @@ env:
CNB_REGISTRY: "docker.cnb.cool"
jobs:
nix-packaging:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
- name: Build Nix desktop package
run: nix build .#dbx-desktop --no-link --print-build-logs
bump-jdbc-plugin-version:
runs-on: ubuntu-latest
outputs:
@@ -381,7 +392,8 @@ jobs:
--clobber
publish:
needs: [cleanup-release-signatures, docker-manifest, jdbc-plugin]
# Keep the release as a draft until every platform and the Nix package pass.
needs: [cleanup-release-signatures, docker-manifest, jdbc-plugin, nix-packaging]
runs-on: ubuntu-latest
steps:
- name: Publish draft release
+3 -3
View File
@@ -35,8 +35,8 @@ jobs:
set -euo pipefail
build_log=$(mktemp)
if nix build .#dbx-desktop --no-link --print-build-logs >"$build_log" 2>&1; then
echo "Nix package already has the correct pnpm hash."
if nix build .#dbx-pnpm-deps --no-link --print-build-logs >"$build_log" 2>&1; then
echo "Nix pnpm dependencies already have the correct hash."
exit 0
fi
@@ -50,7 +50,7 @@ jobs:
EXPECTED_HASH="$expected_hash" perl -0pi -e \
's/(hash = ")sha256-[^"]+(")/$1 . $ENV{EXPECTED_HASH} . $2/e' flake.nix
nix build .#dbx-desktop --no-link --print-build-logs
nix build .#dbx-pnpm-deps --no-link --print-build-logs
if git diff --quiet -- flake.nix; then
echo "The Nix build passed without changing flake.nix."