forked from osmosis-labs/osmosis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add goreleaser commands to Makefile and create a Github Action to ru…
…n goreleaser (osmosis-labs#5908) * Update goreleaser configuration to match previous releases * add dist folder to .gitignore * Add release commands to Makefile * Add COSMWASM_VERSION to release command * Remove double \'v\' from version * Add release github action * Add tag as release workflow input * Update goreleaser CI: fix permissions and add docs * Update github owner
- Loading branch information
1 parent
092808f
commit db45ec4
Showing
4 changed files
with
112 additions
and
52 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This workflow creates a release using goreleaser | ||
# via the 'make release' command. | ||
|
||
name: Create release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_tag: | ||
description: 'The desired tag for the release (e.g. v0.1.0).' | ||
required: true | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Create release | ||
runs-on: self-hosted | ||
steps: | ||
- | ||
name: Check out repository code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.inputs.release_tag }} | ||
- | ||
name: Make release | ||
run: | | ||
sudo rm -rf dist | ||
make release | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,14 @@ project_name: osmosisd | |
|
||
env: | ||
- CGO_ENABLED=1 | ||
- COSMWASM_VERSION=1.2.3 | ||
|
||
builds: | ||
- id: osmosisd-darwin-amd64 | ||
main: ./cmd/osmosisd/main.go | ||
binary: osmosisd | ||
hooks: | ||
pre: | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/v{{ .Env.COSMWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a | ||
env: | ||
- CC=o64-clang | ||
- CGO_LDFLAGS=-L/lib | ||
|
@@ -39,7 +38,7 @@ builds: | |
binary: osmosisd | ||
hooks: | ||
pre: | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/v{{ .Env.COSMWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a | ||
env: | ||
- CC=oa64-clang | ||
- CGO_LDFLAGS=-L/lib | ||
|
@@ -68,7 +67,7 @@ builds: | |
binary: osmosisd | ||
hooks: | ||
pre: | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/v{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/x86_64-linux-gnu/libwasmvm_muslc.a | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/x86_64-linux-gnu/libwasmvm_muslc.a | ||
goos: | ||
- linux | ||
goarch: | ||
|
@@ -97,7 +96,7 @@ builds: | |
binary: osmosisd | ||
hooks: | ||
pre: | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/v{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.aarch64.a -O /usr/lib/aarch64-linux-gnu/libwasmvm_muslc.a | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.aarch64.a -O /usr/lib/aarch64-linux-gnu/libwasmvm_muslc.a | ||
goos: | ||
- linux | ||
goarch: | ||
|
@@ -126,61 +125,36 @@ universal_binaries: | |
ids: | ||
- osmosisd-darwin-amd64 | ||
- osmosisd-darwin-arm64 | ||
replace: true | ||
name_template: "{{.ProjectName}}" | ||
replace: false | ||
|
||
archives: | ||
- id: zipped | ||
builds: | ||
- osmosisd-darwin-universal | ||
- osmosisd-linux-amd64 | ||
- osmosisd-linux-arm64 | ||
name_template: "{{.ProjectName}}-{{ .Os }}-{{ .Arch }}" | ||
- osmosisd-darwin-amd64 | ||
- osmosisd-darwin-arm64 | ||
name_template: "{{.ProjectName}}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" | ||
format: tar.gz | ||
files: | ||
- none* | ||
- id: binaries | ||
builds: | ||
- osmosisd-darwin-universal | ||
- osmosisd-linux-amd64 | ||
- osmosisd-linux-arm64 | ||
name_template: "{{.ProjectName}}-{{ .Os }}-{{ .Arch }}" | ||
- osmosisd-linux-amd64 | ||
- osmosisd-darwin-amd64 | ||
- osmosisd-darwin-arm64 | ||
name_template: "{{.ProjectName}}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" | ||
format: binary | ||
files: | ||
- none* | ||
|
||
checksum: | ||
name_template: "checksums.txt" | ||
name_template: "sha256sum.txt" | ||
algorithm: sha256 | ||
|
||
# Docs: https://goreleaser.com/customization/homebrew/ | ||
brews: | ||
- name: osmosisd | ||
folder: Formula | ||
ids: | ||
- binaries | ||
homepage: "https://gihub.com/osmosis-labs/osmosis" | ||
description: "osmosisd binary to interact with the Osmosis network" | ||
conflicts: | ||
- osmosisd | ||
test: | | ||
system "#{bin}/osmosisd version" | ||
install: | | ||
bin.install 'osmosisd' | ||
skip_upload: true | ||
# # Uncomment line below if you want to try to commit the updated formula | ||
# skip_upload: false | ||
# repository: | ||
# owner: osmosis-labs | ||
# name: homebrew-osmosis | ||
# branch: main | ||
# pull_request: | ||
# enabled: true | ||
# commit_author: | ||
# name: osmo-bot | ||
# email: [email protected] | ||
# commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" | ||
|
||
# Docs: https://goreleaser.com/customization/changelog/ | ||
changelog: | ||
skip: true | ||
|
@@ -200,8 +174,8 @@ release: | |
## ⚡️ Binaries | ||
Binaries for Linux (amd64 and arm64) are available below. | ||
Darwin users can use the same universal binary for both amd64 and arm64. | ||
Binaries for Linux and Darwin (amd64 and arm64) are available below. | ||
Darwin users can also use the same universal binary `osmosisd-{{ .Version }}-darwin-all` for both amd64 and arm64. | ||
#### 🔨 Build from source | ||
|
@@ -218,12 +192,12 @@ release: | |
As an alternative to installing and running osmosisd on your system, you may run osmosisd in a Docker container. | ||
The following Docker images are available in our registry: | ||
| Image Name | Base | Description | | ||
|------------|------|---------| | ||
| `osmolabs/osmosis:{{ .Version }}` | `distroless/static-debian11` | Default image based on Distroless | | ||
| `osmolabs/osmosis:{{ .Version }}-distroless` | `distroless/static-debian11` | Distroless image (same as above) | | ||
| `osmolabs/osmosis:{{ .Version }}-nonroot` | `distroless/static-debian11:nonroot` | Distroless non-root image | | | ||
| `osmolabs/osmosis:{{ .Version }}-alpine` | `alpine` | Alpine image | | ||
| Image Name | Base | Description | | ||
|----------------------------------------------|--------------------------------------|-----------------------------------| | ||
| `osmolabs/osmosis:{{ .Version }}` | `distroless/static-debian11` | Default image based on Distroless | | ||
| `osmolabs/osmosis:{{ .Version }}-distroless` | `distroless/static-debian11` | Distroless image (same as above) | | ||
| `osmolabs/osmosis:{{ .Version }}-nonroot` | `distroless/static-debian11:nonroot` | Distroless non-root image | | ||
| `osmolabs/osmosis:{{ .Version }}-alpine` | `alpine` | Alpine image | | ||
Example run: | ||
|
@@ -239,7 +213,6 @@ release: | |
draft: true | ||
|
||
# Docs: https://goreleaser.com/customization/announce/ | ||
# | ||
# We could automatically announce the release in | ||
# - discord | ||
# - slack | ||
|
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