aoc-toolkit 0.1.0-alpha.4

A toolkit for solving Advent of Code problems
Documentation
# Releasing

The package and executable share one SemVer version. A version tag (vX.Y.Z) must match Cargo.toml. Release tags must point to reviewed commits on main.

## One-time maintainer setup

In GitHub repository settings:

- Enable immutable releases.
- Protect main with required checks and review. Restrict changes to release workflows through review and appropriate repository access.
- Assign the Maintain role directly to approved maintainers of this repository; no organization team is required. Create a tag ruleset for v* restricting creations, with only the Maintain role and repository administrators as bypass actors. Create a separate tag ruleset for v* restricting updates and deletions with no bypass actors.
- Create environment **release** with individual required reviewers limited to approved release maintainers, deployment tags restricted to v*, and admin bypass disabled where possible. If there is only one maintainer, allow self-review; with multiple independent reviewers, prefer preventing self-review.
- Keep environment and repository administration restricted to trusted maintainers. No RELEASE_ACTORS variable is required. Tag creation is the only release trigger. Re-running an existing workflow does not bypass the protected environment. GitHub users with Write access can still create releases manually for existing tags; limit Write access to trusted collaborators.

The repository settings are not applied by this workflow.

## Crates.io Trusted Publishing

The crate has been bootstrapped. All subsequent publications use Trusted Publishing (OIDC); the release workflow has no long-lived API token fallback.

Configure the trusted publisher in the crate's settings:

- GitHub repository owner: KyrboForge
- Repository: aoc-toolkit
- Workflow filename: release.yml
- Environment: release

Require Trusted Publishing in the crate's settings to prevent publication using ordinary API tokens. Revoke any obsolete bootstrap token and remove its environment secret and variable if still present.

The protected release job has `id-token: write` and obtains a short-lived registry token through `rust-lang/crates-io-auth-action`. Cargo receives this token only during the publish step. If OIDC authentication fails, publication stops; investigate the publisher configuration and environment protection rather than adding an API token fallback.

Do not put real credentials in the repository or workflow logs.

## Release procedure

1. Update Cargo.toml and Cargo.lock, and update README.md or other documentation when user-facing behavior changes. Review and merge through the normal PR flow. GitHub Releases is the source of release history; release notes are generated automatically. Use descriptive PR titles.
2. Run CI and review package contents and dependency audit.
3. An authorized maintainer creates and pushes a version tag on the reviewed main commit.
4. The workflow validates the protected tag, runs CI, builds five native binaries and verifies the archives and SHA-256 checksums.
5. The protected release environment requires approval. The workflow creates a draft GitHub release with ten assets (five archives and five checksums), verifies the draft, publishes the crate to crates.io, then publishes the GitHub release automatically. Prerelease versions are marked as prereleases.
6. Verify both registries and the workflow outcome.

GitHub and crates.io are independent services; publication is not atomic. If draft creation or crate publication fails, the release must remain unpublished. If crates.io succeeds but the final GitHub publication fails, the crate version is permanent: inspect the registry and draft and finish publishing the verified draft deliberately. The workflow fails closed when a release already exists; it never overwrites existing assets or attempts to republish a crate automatically. Do not delete a published release to retry a build.

Release builds use native hosted runners: Linux GNU x86_64/ARM64, macOS x86_64/ARM64 and Windows MSVC x86_64. The GNU builds are not static or musl builds. macOS signing/notarization and Windows signing are not implemented. Document any minimum OS/glibc requirements before claiming stable binary compatibility.

Never publish a private session, puzzle input or answer. The released tool must be usable without repository source files; embedded templates must be included in the Cargo package.

## CI concurrency

Automatic CI groups runs by branch or pull request. A newer run in the same group cancels the running predecessor. Manually dispatched CI runs and CI called by the tag-based release workflow use a run-specific group.