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

CI: add release workflow for building binaries #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daywalker90
Copy link

This PR adds a workflow to create a release with release binaries.

It cross compiles for:

  • x86_64-unknown-linux-gnu
  • aarch64-unknown-linux-gnu
  • armv7-unknown-linux-gnueabihf

using cross and only requires glibc >= 2.31.

I packaged teosd and teos-cli together while watchtower-client is in an extra archive.

For better cross compatibility i removed the dependency to the system specific openssl and replaced it with rustls-tls.

For this job to trigger you have to push an annotated tag. It will only trigger on tags that represent final releases.

This project does not have a CHANGELOG.md so i commented in two methods on how to provide the content body for the release:

  • either create a CHANGELOG.md that adheres to the formatting of keepachangelog
  • or use the message from the annotated tag (can also be a file with -F)

You can of course also just edit the release body manually on the website but then it won't show in the notification email that is send to users.

Copy link
Collaborator

@mariocynicys mariocynicys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave this a quick review. Will have to test it thoroughly in a fork.

.github/workflows/release.yml Outdated Show resolved Hide resolved
Comment on lines +30 to +28
cross build --release --locked --target x86_64-unknown-linux-gnu
cross build --release --locked --target armv7-unknown-linux-gnueabihf
cross build --release --locked --target aarch64-unknown-linux-gnu
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add macos & windows as well?, if possible.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried with macos but gave up sorry.

Comment on lines 33 to 38
tar -czf "teos-${{github.ref_name}}-aarch64-linux-gnu.tar.gz" --transform 's|.*/||' "target/aarch64-unknown-linux-gnu/release/teosd" "target/aarch64-unknown-linux-gnu/release/teos-cli"
tar -czf "teos-${{github.ref_name}}-armv7-linux-gnueabihf.tar.gz" --transform 's|.*/||' "target/armv7-unknown-linux-gnueabihf/release/teosd" "target/armv7-unknown-linux-gnueabihf/release/teos-cli"
tar -czf "teos-${{github.ref_name}}-x86_64-linux-gnu.tar.gz" --transform 's|.*/||' "target/x86_64-unknown-linux-gnu/release/teosd" "target/x86_64-unknown-linux-gnu/release/teos-cli"
tar -czf "watchtower-client-${{github.ref_name}}-aarch64-linux-gnu.tar.gz" --transform 's|.*/||' "target/aarch64-unknown-linux-gnu/release/watchtower-client"
tar -czf "watchtower-client-${{github.ref_name}}-armv7-linux-gnueabihf.tar.gz" --transform 's|.*/||' "target/armv7-unknown-linux-gnueabihf/release/watchtower-client"
tar -czf "watchtower-client-${{github.ref_name}}-x86_64-linux-gnu.tar.gz" --transform 's|.*/||' "target/x86_64-unknown-linux-gnu/release/watchtower-client"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's split this part into its own step for a little bit more readability.

Also, what do you think about removing the gnu & gnueabihf endings?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally i don't care about these. I removed them.

@daywalker90 daywalker90 force-pushed the release-ci branch 6 times, most recently from 38eef37 to 6972d03 Compare June 30, 2024 14:43
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.

None yet

2 participants