Skip to content
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

Use Github Action to automatically publish crate to crate.io #211

Merged
merged 10 commits into from
Sep 7, 2021

Conversation

ramsayleung
Copy link
Owner

@ramsayleung ramsayleung commented May 9, 2021

Description

Adding a continuous deployment flow with Github Action that automatically publish everything to crates.io once a tag is published

Motivation and Context

Fixed #210

Dependencies

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

After this PR merged, creating a new tag named 0.10 and check if the Continuous Deployment flow works. Is there a better way to test?

@marioortizmanero
Copy link
Collaborator

marioortizmanero commented May 9, 2021

Would this work after #207? Because we'd need to publish multiple crates in that case.

@ramsayleung
Copy link
Owner Author

Would this work after #207? Because we'd need to publish multiple crates in that case.

Yes, we could leave this PR alone until #207 merged, since this PR is small, it's fine to keep it pending.

@marioortizmanero
Copy link
Collaborator

Note that #207 has already been merged, so you may continue your work on this now. No rush of course, as I see you're still busy with #224. I just wanted to update the status of this PR :)

As a tip, you might want to take a look at how already existing crates do this:

Bevy's solution is probably easier because I don't think we'll be modifying the set of crates in the repo anytime soon. If you have difficulties with the shell scripting let me know and I'll help you out.

@ramsayleung
Copy link
Owner Author

ramsayleung commented Sep 2, 2021

Bevy's solution is probably easier because I don't think we'll be modifying the set of crates in the repo anytime soon. If you have difficulties with the shell scripting let me know and I'll help you out.

I am fine with bash script, thanks. It seems Bevy uses a shell script to publish crates, but it doesn't leverage on Github Action CI? Just publishing by running shell script.

@marioortizmanero
Copy link
Collaborator

Yes they seem to release the new versions manually. In our case we just have to run the script in the CI flow.

@marioortizmanero
Copy link
Collaborator

No, sorry. What I meant is that you could make publish.sh an executable within the repo so that you don't need to run chmod u+x publish.sh in the CI flow

@marioortizmanero
Copy link
Collaborator

Also I think the git config part isn't necessary, in other projects' CI I haven't added that and it worked fine. Afterwards we can merge.

@marioortizmanero marioortizmanero merged commit 1e2d62b into master Sep 7, 2021
@marioortizmanero marioortizmanero deleted the ramsay_use_ci_to_publish_crate branch September 7, 2021 08:03
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.

[meta] could you tag crate releases
2 participants