Skip to content

Commit 60d7d44

Browse files
committed
ci(nix): Move flake version+hash sync into release pipeline
Replaces the per-PR auto-fix workflow with in-release synchronization. The release pipeline now installs Determinate Nix and the prepareCmd runs `determinate-nixd fix hashes --auto-apply flake.nix` alongside the version sed, so the release commit always has both correct `version =` and correct `vendorHash`. Tags become self-consistent, which is what's needed for cross-repo Flox manifests pinning to `github:inference-gateway/cli/v<tag>`. Reverts the nix-build.yml path filter additions for go.mod/go.sum. Without the auto-fix workflow, those filters would just produce noisy red CI on every Dependabot PR. nix-build now only runs when flake.nix itself changes. Removes nix-fix-hashes.yml. Dependabot PRs no longer auto-resolve vendorHash on the PR branch — `main` may have stale vendorHash between releases, but each release pipeline refreshes it. Trade-off: `nix build github:inference-gateway/cli` (default branch) may fail mid-cycle; pin to tags for reliability. Release pipeline cost: ~30-60s for Determinate Nix install + a few seconds for `fix hashes` (mostly cached after first release).
1 parent 92b715d commit 60d7d44

4 files changed

Lines changed: 5 additions & 81 deletions

File tree

.github/workflows/nix-build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Nix Build Verification
23

34
concurrency:
@@ -11,17 +12,13 @@ on:
1112
paths:
1213
- 'flake.nix'
1314
- 'flake.lock'
14-
- 'go.mod'
15-
- 'go.sum'
1615
- '.github/workflows/nix-build.yml'
1716
push:
1817
branches:
1918
- main
2019
paths:
2120
- 'flake.nix'
2221
- 'flake.lock'
23-
- 'go.mod'
24-
- 'go.sum'
2522
- '.github/workflows/nix-build.yml'
2623
workflow_dispatch:
2724

.github/workflows/nix-fix-hashes.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ jobs:
7171
conventional-changelog-conventionalcommits@9.1.0 \
7272
conventional-changelog-cli@5.0.0
7373
74+
- name: Install Determinate Nix
75+
uses: DeterminateSystems/determinate-nix-action@v3
76+
7477
- name: Check for existing releases
7578
id: check_releases
7679
env:

.releaserc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ plugins:
9090
- - "@semantic-release/exec"
9191
- prepareCmd: |
9292
sed -i.bak 's|version = "[^"]*";|version = "${nextRelease.version}";|' flake.nix && rm flake.nix.bak
93+
determinate-nixd fix hashes --auto-apply flake.nix
9394
9495
- - "@semantic-release/git"
9596
- assets:

0 commit comments

Comments
 (0)