rahul-thakoor / rust_gpiozero

A library inspired by gpiozero written in Rust
https://crates.io/crates/rust_gpiozero
Apache License 2.0
233 stars 27 forks source link

Replace travis with GitHub Actions #32

Closed dcroote closed 2 years ago

dcroote commented 2 years ago

As mentioned in https://github.com/rahul-thakoor/rust_gpiozero/issues/11#issuecomment-997450687, here is the GitHub Actions build replacement for travis CI. It uses a matrix strategy with 3 targets and leverages the built-in cross functionality of the actions-rs/cargo@v1 Action.

Here is the successful Actions run on my fork.

rahul-thakoor commented 2 years ago

thanks, @dcroote :)

what's the easiest way to publish automatically to crates.io?

maybe we publish only prs with semantic version tags?

dcroote commented 2 years ago

Hi @rahul-thakoor - sure thing!

I added a job to the workflow that depends on the build job and publishes only push commits with a tag to crates.io. Note you'll need to go to this repo's Settings, then Secrets, and add a new repository secret named CRATES_IO_TOKEN for this to work.