-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add goreleaser, cleanup release process (#2549)
* chore: add goreleaser, cleanup release process * chore: update RELEASING.md * chore: add RELEASE_NOTES.md; add make create-release * chore: rm old release file * update release process * fix: apply review comments * chore: update RELEASE_PROCESS.md with PR comments * chore: add install step for goreleaser dry-run --------- Co-authored-by: mpoke <marius.poke@posteo.de>
- Loading branch information
Showing
8 changed files
with
308 additions
and
311 deletions.
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.