Skip to content

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

Merged
marioortizmanero merged 10 commits into
masterfrom
ramsay_use_ci_to_publish_crate
Sep 7, 2021
Merged

marioortizmanero merged 10 commits into
masterfrom
ramsay_use_ci_to_publish_crate

Conversation

@ramsayleung

@ramsayleung ramsayleung commented May 9, 2021 •

Copy link
Copy Markdown
Owner

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

marioortizmanero commented May 9, 2021 •

Copy link
Copy Markdown
Collaborator

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

@ramsayleung

Copy link
Copy Markdown
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
Copy Markdown
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

ramsayleung commented Sep 2, 2021 •

Copy link
Copy Markdown
Owner Author

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
Copy Markdown
Collaborator

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

Comment thread .github/workflows/publish.yaml Resolved
@marioortizmanero

Copy link
Copy Markdown
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
Copy Markdown
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.

ramsayliang and others added 3 commits September 7, 2021 09:37
@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