-
Notifications
You must be signed in to change notification settings - Fork 56
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
ci: add publishing workflow (triggered by tags) #248
Conversation
That might work now that changes in version metadata are correctly rejected by crates.io.... But we've had some problems with exactly such a trigger in the past on the |
.github/workflows/publish.yaml
Outdated
- name: Publish spirv | ||
run: cargo publish --manifest-path spirv/Cargo.toml --token ${{ secrets.cratesio_token }} | ||
- name: Publish rspirv | ||
run: cargo publish --manifest-path rspirv/Cargo.toml --token ${{ secrets.cratesio_token }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a final newline maybe?
.github/workflows/publish.yaml
Outdated
on: | ||
push: | ||
tags: | ||
- '*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tags:
should be enough. And maybe only when Cargo.toml
changes?
- '*' |
https://github.com/Traverse-Research/rust-template/blob/main/.github/workflows/publish.yaml
(That path needs to be changed for the workspace crates though)
Note that we use |
Thanks for suggestions, I added the |
push: | ||
tags: | ||
paths: "**/Cargo.toml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do wonder if this now runs twice when a tag for spirv
and rspirv
are pushed concurrently. Maybe we can use GitHub's concurrency:
feature with the commit SHA as hash when they are both pointing to the same tag? (And we should try to avoid two different dependent commits that bump each tag individually)
Did some tests with
|
The repo I linked also has a For replacing the version of |
Just noticed that there already are existing |
Ou yeah, that must have actually been the origin of these files in our repo... But it does mean you cannot publish both crates with one command at once... I wonder if |
Unfortunately it doesn't seem to support this workflow properly currently, ideally we would be able publish both together or also individually, but this decoupled configuration seems currently not available. I would go forward with the existing workflow as I currently don't see a straightforward way to improve it. |
There are mentions of workspaces in the docs but I'm not fully understanding if, and if so how, it could bump internal dependencies to different versions. |
Hmm since there is |
Right, that was one of the issues I faced as well when trying
|
Add a github workflow for publishing the crates semi-automatically. Currently went for tag based trigger due to metadata changes to
Cargo.toml
but open to switch to the 'normal'Cargo.toml
trigger.Secret already added in the settings.