ci(nix): add workflow to recompute release-data.json hashes#208
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a manual workflow_dispatch (
.github/workflows/nix-update.yml) that updatespackaging/nix/release-data.jsonon 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 onubuntu-latestwith Nix installed and computes the three fixed-output hashes:hash(source) —nix-prefetch-github ZenNotes zennotes --rev vX.Y.ZnpmDepsHash—prefetch-npm-depson the tag's rootpackage-lock.jsonvendorHash— fake-hash the Go build, scrape the real hash from the mismatch errorThen it verifies with
nix build .#zennotes-desktop .#zennotes-serverand opens a PR with the updatedrelease-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.