-
Notifications
You must be signed in to change notification settings - Fork 252
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
build: Goreleaser (backport #2437) #2463
Merged
Merged
Conversation
This file contains 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
## Overview **UPDATE** This PR adds building binaries to the release process by using [goreleaser](https://goreleaser.com/). The CI release process is largely unchanged. Releases can be trigger by either manually triggering the `ci_release` workflow, or they can be triggered by pushing a version tag. I know the team has not been using the CI to generate releases, so I added a `make goreleaser-release` command to build the linux distro binaries for the release locally so that they can be manually uploaded. Result of running `make goreleaser-release`: ``` tree build build └── goreleaser ├── CHANGELOG.md ├── artifacts.json ├── celestia-app_Linux_x86_64.tar.gz ├── celestia-app_linux_amd64_v1 │ └── celestia-appd ├── checksums.txt ├── config.yaml └── metadata.json ``` Since we are just building for `linux amd64`, I hard coded the `ledger` build tag to simplify the changes. The `.goreleaser.yaml` file is 90% stock generated from `goreleaser init`. The celestia app specific items are: ```yaml builds: - main: ./cmd/celestia-appd binary: celestia-appd env: - SDKPath={{ "github.com/cosmos/cosmos-sdk/version" }} goarch: - amd64 goos: - linux tags: - ledger ldflags: # Ref: https://goreleaser.com/customization/templates/#common-fields # # .FullCommit is git commit hash goreleaser is using for the release # # .Version is the version being released - -X "{{ .Env.SDKPath }}.Name=celestia-app" - -X "{{ .Env.SDKPath }}.AppName=celestia-appd" - -X "{{ .Env.SDKPath }}.Version={{ .Version }}" - -X "{{ .Env.SDKPath }}.Commit={{ .FullCommit }}" dist: ./build/goreleaser ``` For building locally, i added a `make goreleaser-build` command. The binaries are put into a `build/goreleaser` directory. The `make goreleaser` command lists the `goreleaser` commands and also checks the version as a way to verify you have `goreleaser` installed. Result of running `make goreleaser-build`: ``` tree build build └── goreleaser ├── artifacts.json ├── celestia-app_darwin_amd64_v1 │ └── celestia-appd ├── config.yaml └── metadata.json ``` Successful github action run: https://github.com/MSevey/celestia-app/actions/runs/6115034436/job/16597834241 Example release generated: https://github.com/MSevey/celestia-app/releases Created #2445 as a follow up discussion how to add signing. --------- Co-authored-by: Rootul P <rootulp@gmail.com> (cherry picked from commit 59a76d3) # Conflicts: # .github/workflows/ci-release.yml
mergify
bot
requested review from
evan-forbes,
rootulp and
cmwaters
as code owners
September 11, 2023 12:45
rootulp
approved these changes
Sep 11, 2023
Codecov Report
@@ Coverage Diff @@
## v1.x #2463 +/- ##
==========================================
- Coverage 20.52% 20.49% -0.04%
==========================================
Files 138 138
Lines 15761 15788 +27
==========================================
Hits 3235 3235
- Misses 12219 12246 +27
Partials 307 307
|
liamsi
approved these changes
Sep 11, 2023
cmwaters
reviewed
Sep 13, 2023
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 is an automatic backport of pull request #2437 done by Mergify.
Cherry-pick of 59a76d3 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the rules@Mergifyio rebase
will rebase this PR on its base branch@Mergifyio update
will merge the base branch into this PR@Mergifyio backport <destination>
will backport this PR on<destination>
branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com