Skip to content

ci: add release pipeline + cut v0.1.1#1

Merged
ehsanbigzad merged 2 commits into
mainfrom
dev
May 22, 2026
Merged

ci: add release pipeline + cut v0.1.1#1
ehsanbigzad merged 2 commits into
mainfrom
dev

Conversation

@ehsanbigzad
Copy link
Copy Markdown
Member

Sets up the dev → main flow with minimal CI and an automated release pipeline.

What this PR adds

File Role
`.github/workflows/pr-check.yml` Runs `cargo check --workspace --all-features` on every PR to `main`. Fast (~1 min cached), just verifies it compiles.
`.github/workflows/publish.yml` On push to `main`, reads the crate version from Cargo.toml. If no tag exists for that version, creates the tag, runs `cargo publish`, and creates the GitHub release with auto-generated notes.
`scripts/release.sh` Local one-shot: `./scripts/release.sh 0.2.0` bumps version on `dev`, commits, pushes, opens a release PR.

New flow

Everyday work

  1. Branch off `dev`, push, open PR `dev` → `main`.
  2. `cargo check` runs.
  3. Review, merge.

Releases

  1. `./scripts/release.sh 0.2.0`.
  2. Review + merge the auto-opened release PR.
  3. Tag + crates.io publish + GitHub release happen automatically.

Before merging

You'll need to do these one-time setups, otherwise the publish workflow can't function:

  1. Add repo secret `CARGO_REGISTRY_TOKEN` at https://github.com/postcrate/core/settings/secrets/actions (scope: publish-update for crate postcrate-core).
  2. Set up branch protection on `main` to require PRs + the `cargo check` status check.
  3. Install `cargo-edit` locally if you don't have it: `cargo install cargo-edit` (only needed to use `./scripts/release.sh`).

- pr-check.yml: cargo check --workspace --all-features on PRs to main.
- publish.yml: on push to main, detect crate version bump; if a new
  version, tag, cargo publish, and create the GitHub release.
- scripts/release.sh: one-shot 'open a release PR from dev' command.
  Requires cargo-edit (cargo install cargo-edit) and gh CLI.
@ehsanbigzad ehsanbigzad changed the title ci: add PR check + auto-release pipeline ci: add release pipeline + cut v0.1.1 May 22, 2026
@ehsanbigzad ehsanbigzad merged commit e0c5170 into main May 22, 2026
1 check passed
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