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.
This is an attempt to add an automated CHANGELOG.md using conventional commits. This also represents a point in time that a few decisions need to be made. Specifically: this implementation leans more more heavily on nix than just provided a devshell and some packages. For the most part it isn't locking us down to nix, but using it makes it a lot more simple to manage and reason though. I will also discuss a caveat to this and what can be done.
tooling
configuration
This adds two GitHub Actions jobs. One can call
cog bump
, push the updated code, and create a GitHub release with the changelog. The other can verify that all commits are valid conventional commits (and runs on PR). To assist in this a number of scripts have been defined in the nix devshell. These are all added to PATH in the devshell and are available. The actions usenix develop -c "command"
to invoke a single command at a time. I haven't tested the actions (since they need to be on GitHub to run) but the individual scripts they call do seem to work as expected.When
cog bump
is called, it executes bomper to update hardcoded strings at the same time (seecog.toml
andbomp.toml
), which will keep the versions properly up to date. If this is misconfigured the operation will fail.caveats
Since this uses nix for CI it will have to build all of the dependencies when needed. During local development this isn't a huge problem because the derivations will quickly be cached. In GitHub actions though, it will not be persisted without a self-hosted runner. While it may be possible to come up with a cache action for these dependencies, there does not seem to be any publicly available good solutions. That is, except a subscription to cachix's starter tier and the cachix-action. I have experience working with it and the set up is very simple and dramatically reduces the time needed. Another benefit is that it can be included on developer machines and can share the same cache. Alternatively a self-hosted runner would probably work, although I've never tried that with nix.
TODO
workflow_dispatch