Skip to content

feat(ci): cache store, build packages via checks, split out release job#138

Open
sshine wants to merge 3 commits into
hall:mainfrom
sshine:chore/pull-request-ci
Open

feat(ci): cache store, build packages via checks, split out release job#138
sshine wants to merge 3 commits into
hall:mainfrom
sshine:chore/pull-request-ci

Conversation

@sshine

@sshine sshine commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Stacked on:

Please address that first.

What this does

  • on: scope pull_request to main; add semver tags so release-tagged commits re-run checks.
  • tests: pin actions by SHA, add cache-nix-action (Nix store survives runs), build the dev shell.
  • checks: new packages check link-farms every package, so nix flake check builds the whole
    set. Previously packages were only evaluated, not built.
  • packages: example packages are derived from the filesystem (any example with a module.nix)
    instead of a hardcoded list.
  • release: own job triggered on version tags; pinned softprops/action-gh-release with generated
    notes, replacing the changelog-parsing steps.

Test plan

  • nix flake check (builds all checks incl. the new packages check).
  • CI: verify the release job only runs on X.Y.Z tag pushes.

@sshine sshine force-pushed the chore/pull-request-ci branch from 1e02532 to 2b18679 Compare July 10, 2026 08:47
@sshine

sshine commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

I removed the following from ci.yml:

      - name: parse changelog
        id: changelog
        uses: coditory/changelog-parser@v1

And added it back (with hash-pinning) to changelog.yml along with a check that fails when not updating CHANGELOG.md which triggered on this pull request:

Screenshot From 2026-07-10 10-49-50

I don't know if changing the CI warrants a CHANGELOG.md entry, though.

Perhaps we can discuss that before I make CI pass.

@adrian-gierakowski

Copy link
Copy Markdown
Collaborator

No, internal tooling should not go into changelog. changelog should only contain info relevant to consumers.

@sshine sshine force-pushed the chore/pull-request-ci branch from 2b18679 to 6a1814c Compare July 11, 2026 10:24
@sshine

sshine commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

In another project I co-maintain, we just let go of CHANGELOG.md in favour of GitHub's release generator. I like not being tied to GitHub as a principle, but I also like automation.

Another approach to changelog automation is git-cliff. So contributors don't need to actively maintain the changelog, it gets a big push just before releasing.

@adrian-gierakowski

Copy link
Copy Markdown
Collaborator

I like the idea of changelog generated from git history (no GitHub lock in required for this). But we'd have to enforce commit conversion (it would need a ci check and a doc for humans and agents)

sshine added 3 commits July 15, 2026 15:03
- Add flake-parts, import-tree
- Renamed treefmt -> treefmt-nix input
- Moved all flake.nix output content to flake/
on:
- Scope `pull_request` to `main` and add semver tags so release-tagged commits re-run checks.

tests:
- Pin actions by commit SHA and add cache-nix-action; the Nix store now survives between runs.
- Build the dev shell, covering `devShells.default` which `nix flake check` only evaluates.

checks:
- Add a `packages` check link-farming every package, so `nix flake check` builds the whole set;
  packages were previously only evaluated, letting generator/docs/example regressions slip through.

packages:
- Derive example packages from the filesystem (any example with a `module.nix`) instead of a
  hardcoded list, so the buildable set stays a single source of truth as examples come and go.

release:
- Move release into its own job triggered on version tags, replacing the changelog-parsing dance.
- Pin softprops/action-gh-release by SHA and let it generate notes; drop the dangling `files:` input.
changelog.yml:
- Require a `CHANGELOG.md` entry on every PR to `main`, bypassable via a commit-message phrase.
- Validate `CHANGELOG.md` still parses on pushes to `main` that touch it, via changelog-parser.

A changelog entry is not necessary.
@sshine sshine force-pushed the chore/pull-request-ci branch from 6a1814c to 8f18fbe Compare July 15, 2026 13:03
@sshine

sshine commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Should I remove all things changelog-related in this PR, anticipating an effort to automate it with git-cliff + a CI check? Or should I leave it as-is because this is better than no checks in the meantime?

We don't actually need a doc if we have a commit-msg hook activated by the devshell, e.g. with lefthook-nix.

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.

2 participants