-
Notifications
You must be signed in to change notification settings - Fork 710
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
chore: add goreleaser, cleanup release process #2549
Merged
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0cbcb92
chore: add goreleaser, cleanup release process
MSalopek fea07a4
chore: update RELEASING.md
MSalopek c6d2805
chore: add RELEASE_NOTES.md; add make create-release
MSalopek 1a74879
chore: rm old release file
MSalopek 251a92d
update release process
mpoke 6fbb7ff
fix: apply review comments
MSalopek 9ff6964
chore: update RELEASE_PROCESS.md with PR comments
MSalopek 8db2089
chore: add install step for goreleaser dry-run
MSalopek 0c61288
Merge branch 'main' into masa/2544-goreleaser
MSalopek 2308abb
Merge branch 'main' into masa/2544-goreleaser
MSalopek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,34 @@ | ||
name: create release | ||
name: "Release" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+\\.[0-9]+\\.[0-9]+" | ||
- "v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+" | ||
# can be used to re-release an existing tag | ||
workflow_dispatch: | ||
|
||
push: | ||
tags: | ||
- "v[0-9]+\\.[0-9]+\\.[0-9]+" | ||
- "v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+" | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3.5.2 | ||
- name: set tag env | ||
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: install go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.x | ||
check-latest: true | ||
- name: Build Artifacts | ||
run: make distclean build-reproducible | ||
- name: generate release note | ||
run: go run ./contrib/generate_release_note/main.go ${{ env.VERSION }} ./artifacts/build_report ./CHANGELOG.md | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body_path: ./releasenote | ||
draft: true | ||
prerelease: false | ||
- name: Upload build_report | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./artifacts/build_report | ||
asset_name: build_report | ||
asset_content_type: application/file | ||
- name: Upload darwin-amd64 artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./artifacts/gaiad-${{ env.VERSION }}-darwin-amd64 | ||
asset_name: gaiad-${{ env.VERSION }}-darwin-amd64 | ||
asset_content_type: application/binary | ||
- name: Upload darwin-arm64 artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./artifacts/gaiad-${{ env.VERSION }}-darwin-arm64 | ||
asset_name: gaiad-${{ env.VERSION }}-darwin-arm64 | ||
asset_content_type: application/binary | ||
- name: Upload linux-amd64 artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./artifacts/gaiad-${{ env.VERSION }}-linux-amd64 | ||
asset_name: gaiad-${{ env.VERSION }}-linux-amd64 | ||
asset_content_type: application/binary | ||
- name: Upload linux-arm64 artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./artifacts/gaiad-${{ env.VERSION }}-linux-arm64 | ||
asset_name: gaiad-${{ env.VERSION }}-linux-arm64 | ||
asset_content_type: application/binary | ||
- name: Upload windows-amd64 artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./artifacts/gaiad-${{ env.VERSION }}-windows-amd64.exe | ||
asset_name: gaiad-${{ env.VERSION }}-windows-amd64.exe | ||
asset_content_type: application/binary | ||
- name: Upload compression | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./artifacts/gaiad-${{ env.VERSION }}.tar.gz | ||
asset_name: gaiad-${{ env.RELEASE_VERSION }}.tar.gz | ||
asset_content_type: application/gzip | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
|
||
- name: Set Env | ||
run: echo "TM_VERSION=$(go list -m github.com/tendermint/tendermint | sed 's:.* ::')" >> $GITHUB_ENV | ||
|
||
- name: Release | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
version: latest | ||
args: release --clean --release-notes ./RELEASE_NOTES.md | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!-- | ||
A release notes template that should be adapted for every release | ||
- release: <v*.*.*> | ||
- release branch: <v*.x> | ||
- the last release: <v-last> | ||
- the last release branch: <v-last.x> | ||
--> | ||
|
||
# Gaia <v*.*.*> Release Notes | ||
|
||
## 📝 Changelog | ||
|
||
Check out the [changelog](https://github.com/cosmos/gaia/blob/<v*.*.*>/CHANGELOG.md) for a list of relevant changes or [compare all changes](https://github.com/cosmos/cosmos-sdk/compare/release/<v-last>...<v*.*.*>) from last release. | ||
|
||
<!-- Add the following line for major releases --> | ||
Refer to the [upgrading guide](https://github.com/cosmos/cosmos-sdk/blob/release/<v*.x>/UPGRADING.md) when migrating from `<v-last.x>` to `<v*.x>`. | ||
|
||
## 🚀 Highlights | ||
|
||
<!-- Add any highlights of this release --> | ||
|
||
## 🔨 Build from source | ||
|
||
```bash | ||
git clone https://github.com/cosmos/gaia | ||
cd gaia && git checkout <v*.*.*> | ||
make install | ||
``` | ||
|
||
## ⚡️ Download binaries | ||
|
||
Binaries for linux, darwin, and windows are available below. |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave it it so we don't need to spend hours figuring out how to have gzipped release binaries in case they are needed