Skip to content

ci(nix): add workflow to recompute release-data.json hashes#208

Merged
adibhanna merged 1 commit into
mainfrom
ci/nix-update-workflow
Jun 19, 2026
Merged

ci(nix): add workflow to recompute release-data.json hashes#208
adibhanna merged 1 commit into
mainfrom
ci/nix-update-workflow

Conversation

@adibhanna

Copy link
Copy Markdown
Contributor

Adds a manual workflow_dispatch (.github/workflows/nix-update.yml) that updates packaging/nix/release-data.json on a CI runner — so the Nix package can be bumped without a local Linux/Nix machine.

On dispatch (input: version, e.g. 2.4.0) it runs on ubuntu-latest with Nix installed and computes the three fixed-output hashes:

  • hash (source) — nix-prefetch-github ZenNotes zennotes --rev vX.Y.Z
  • npmDepsHashprefetch-npm-deps on the tag's root package-lock.json
  • vendorHash — fake-hash the Go build, scrape the real hash from the mismatch error

Then it verifies with nix build .#zennotes-desktop .#zennotes-server and opens a PR with the updated release-data.json (version + all three hashes).

Usage per release

Actions → Update Nix hashes → type the version → Run → review/merge the PR it opens.

Note

Requires the repo setting Settings → Actions → General → "Allow GitHub Actions to create and approve pull requests" to be enabled for the PR-open step.

Manual workflow_dispatch that runs nix on a CI runner to update
packaging/nix/release-data.json for a published release, so the package
can be bumped without a local Linux/Nix machine. Computes hash (source),
npmDepsHash, and vendorHash, verifies with a real build of both
zennotes-desktop and zennotes-server, and opens a PR with the result.
@adibhanna
adibhanna merged commit 6f0c7ad into main Jun 19, 2026
5 checks passed
@adibhanna
adibhanna deleted the ci/nix-update-workflow branch June 19, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant