CI: add release workflow for building binaries#260
Open
daywalker90 wants to merge 1 commit intotalaia-labs:masterfrom
Open
CI: add release workflow for building binaries#260daywalker90 wants to merge 1 commit intotalaia-labs:masterfrom
daywalker90 wants to merge 1 commit intotalaia-labs:masterfrom
Conversation
Collaborator
mariocynicys
left a comment
There was a problem hiding this comment.
Gave this a quick review. Will have to test it thoroughly in a fork.
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 |
Collaborator
There was a problem hiding this comment.
Can we add macos & windows as well?, if possible.
Contributor
Author
There was a problem hiding this comment.
I tried with macos but gave up sorry.
Member
There was a problem hiding this comment.
I'm happy to take a look at this. How were you testing it?
.github/workflows/release.yml
Outdated
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" |
Collaborator
There was a problem hiding this comment.
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?
Contributor
Author
There was a problem hiding this comment.
Personally i don't care about these. I removed them.
38eef37 to
6972d03
Compare
sr-gi
reviewed
Jul 29, 2024
| hex = { version = "0.4.3", features = [ "serde" ] } | ||
| home = "0.5.3" | ||
| reqwest = { version = "0.11", features = [ "blocking", "json", "socks" ] } | ||
| reqwest = { version = "0.11", default-features = false, features = [ "blocking", "json", "socks", "rustls-tls" ] } |
Comment on lines
+67
to
+80
| # - name: Get Changelog Entry | ||
| # id: changelog_reader | ||
| # uses: mindsers/changelog-reader-action@v2 | ||
| # with: | ||
| # version: ${{ steps.tag_name.outputs.current_version }} | ||
| # path: ./CHANGELOG.md | ||
|
|
||
| # - name: Get tag message | ||
| # id: get_tag_message | ||
| # run: | | ||
| # TAG_NAME=$(echo "${GITHUB_REF}" | sed 's/refs\/tags\///') | ||
| # TAG_MESSAGE=$(git for-each-ref --format='%(contents)' "refs/tags/${TAG_NAME}") | ||
| # echo "tag_name=${TAG_NAME}" >> "$GITHUB_OUTPUT" | ||
| # echo "tag_message=${TAG_MESSAGE}" >> "$GITHUB_OUTPUT" |
Comment on lines
+92
to
+93
| # body: "${{ steps.changelog_reader.outputs.changes }} \n\n### Release binaries info\n\n- Release binaries were built using rust ${{ needs.build.outputs.rust-version }}\n- Linux release binaries require glibc>=2.31" | ||
| # body: "${{ steps.get_tag_message.outputs.tag_message }} \n\n### Release binaries info\n\n- Release binaries were built using rust ${{ needs.build.outputs.rust-version }}\n- Linux release binaries require glibc>=2.31" |
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 |
Member
There was a problem hiding this comment.
I'm happy to take a look at this. How were you testing it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a workflow to create a release with release binaries.
It cross compiles for:
x86_64-unknown-linux-gnuaarch64-unknown-linux-gnuarmv7-unknown-linux-gnueabihfusing cross and only requires glibc >= 2.31.
I packaged
teosdandteos-clitogether whilewatchtower-clientis in an extra archive.For better cross compatibility i removed the dependency to the system specific
openssland replaced it withrustls-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:
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.