-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ci publish workflow #22
Conversation
The way in which ive orchestrated this release cycle is under the assumption: That not every PR into main will result in a crates.io release, but rather every tag in the format of vX.X.X on the main branch will result in a new crates.io/GitHub Release. In its current stage in order to fully implement this Release workflow, The repo repository will need to have an API Secret key for
|
@lulf can you add the CARGO_REGISTRY_TOKEN secret to the github settings so this will work? |
I actually don't have access to do that for bt-hci, @Dirbaio ^^ |
@lulf try now |
@alexmoon Done |
* Added initial workflow for publishing * Adjusted trigger for testing purposes * remove branch for testing * adjusted format of release * Reduced trigger criteria * debugging commit * Debugging the trigger * removing if statement for CI passing * release cycle verified and works * Attempting to trigger it purely on tag based * Added release * workflow debugging * Updated ReadMe and Added Release * Updated dependencies * Debugging * commented out version handler * Putting code back to state for Tagging and Release Management * Updated if statement for checking if CI passed * reset versioning number * Changing order to check for tags first * Latest changes on workflow * adding staging release registry * Added main check * Making the code a bit clearer for publishing to crates.io * Commented back in main registry push * Removed staging registry * Reverting back to old README * Removed formatting change * removed cargo.toml formatting * removed staging registry environment variable
Proposal for CI Publishing to crates.io
The following is a very simple solution to ticket #20. It does not involve any changes to the existing CI infrastructure.
How it Works
Whenever a new tag is made in the format VX.X.X, the release workflow will activate. It consists of two jobs.
check
: Which is identical to the tests,yml. Ensuring that every release runs our ci testsrelease
: This job will only run if the check job passes, It will first verify that the Github tag matches the config.toml tag. Only then will it continue on with the build process and then publish both a GitHub Release and crates.io release. All tags should match each other, allowing a single source of truth to be found.What Other options did I try
Testing
It does sucessfully publish crates to the staging crates.io https://staging.crates.io/crates/ci_playground. It was tested both in CI workflow and on terminal using the--dry-run
command.