Skip to content

Conversation

@febo
Copy link
Collaborator

@febo febo commented Mar 17, 2025

Problem

Currently, the "publish" workflow reuses the version bump for both semver checks and publishing. This does not work well for crates that are currently under version 1 (e.g., 0.x) since semver rules are applied differently: 0.x -> 0.y is a major change, while 0.x.y -> 0.x.z is a minor change.

Solution

This PR defines a new job responsible to do the semver checks. It works by temporarily setting the new version of the crate according to the version bump specified and running the semver checks on it. If this is successful, then the publishing job is run.

A successful "dry-run" can be seen here: https://github.com/anza-xyz/pinocchio/actions/runs/13920160293

A correctly unsuccessful one is here: https://github.com/anza-xyz/pinocchio/actions/runs/13920266902

@febo febo requested a review from joncinque March 17, 2025 21:28
@febo febo marked this pull request as ready for review March 17, 2025 21:28
Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just a suggestion for the caching

Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more tiny thing, then this can go in!

@febo febo merged commit 3b2eed4 into main Mar 18, 2025
11 of 12 checks passed
@febo febo deleted the febo/semver branch March 18, 2025 12:21
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.

3 participants