-
Notifications
You must be signed in to change notification settings - Fork 192
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
build: add github action for publishing crates #1012
Conversation
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.
This will publish to the version hardcoded in Cargo.toml
, right? One of the nice things in the pypi workflow is that the version is derived from git, so we:
- Don't have to make sure the version number in the two
Cargo.toml
files match the git tag andpyproject.toml
- Can publish intermediate versions to a test registry; this is great for testing the release pipeline itself
Is there anything we can do to have these properties on the rust side?
command: publish | ||
args: > | ||
--manifest-path ./native/libcst_derive/Cargo.toml | ||
--allow-dirty |
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.
why --allow-dirty
?
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 was testing locally with nektos/act and was getting an issue where cargo publish
wouldn't allow files that weren't committed, even though the files were actually committed. Not sure if this would be the case on GitHub
I am assuming we should be able to derive the version from git, will check more on this. Regarding the second question there is a |
It looks like someone is doing this by replacing the version in the |
f23af55 adds:
Not sure if this is good enough, but I wasn't able to find a homegrown way of using the tag in |
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1012 +/- ##
=======================================
Coverage 91.04% 91.04%
=======================================
Files 255 255
Lines 26366 26366
=======================================
Hits 24004 24004
Misses 2362 2362 ☔ View full report in Codecov by Sentry. |
Huh. Why is there a typing error if no source changes were made? |
I don't know, but it appears on all PRs recently. Some dependency must've
changed
…On Sun, 1 Oct 2023, 4:09 pm Manuel Martinez, ***@***.***> wrote:
Huh. Why is there a typing error if no source changes were made?
—
Reply to this email directly, view it on GitHub
<#1012 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQJNDDNXQOFDKZB2O4C2TX5GBSPANCNFSM6AAAAAA4MYDZLY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
FTR, I fixed this in #1032 |
I'll be able to merge this into the PR later today 👍 |
7c8ada6
to
87b62ec
Compare
I had made a mess of the branch with a |
Bumping this. Are there any blockers currently? |
@zsol checking in on this. I see that the right versions are already on |
@zsol should I close this PR? I see |
Summary
First attempt at automating the publishing of
libcst
andlibcst_derive
to thecrates.io
registry onrelease
andpush
to the main branch. Closes #967.Notes
--allow-dirty
flag was needed during testing since for some reason the files in the workflow are not committed to git andcargo publish
complains about this.libcst_derive
dependency oflibcst
as a local path dependency or if it should be changed to point to thecrates.io
registry.Test Plan
The repository owner should set up a new secret with the
crates.io
token, and name itCRATES_IO_TOKEN
so that the workflow can use the token when publishing to the registry.