Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/goreleaser-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: GoReleaser

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
workflow_dispatch:

permissions:
contents: write

jobs:
goreleaser:
uses: sei-protocol/uci/.github/workflows/goreleaser-release.yml@monty/goreleaser-reusable-workflow
with:
go-version: '1.25.6'
submodules: 'true'
prebuild-script: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends musl musl-tools
87 changes: 87 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
version: 2

project_name: sei-chain

before:
hooks:
- go mod download
- bash scripts/check-libwasmvm-static.sh

builds:
- id: seid
main: ./cmd/seid
binary: seid
env:
- CGO_ENABLED=1
- CC=musl-gcc
flags:
- -trimpath
- -tags=netgo,muslc,ledger
ldflags:
- -s -w
- -X github.com/sei-protocol/sei-chain/sei-cosmos/version.Name=sei
- -X github.com/sei-protocol/sei-chain/sei-cosmos/version.AppName=seid
- -X github.com/sei-protocol/sei-chain/sei-cosmos/version.Version={{ .Version }}
- -X github.com/sei-protocol/sei-chain/sei-cosmos/version.Commit={{ .FullCommit }}
- -X "github.com/sei-protocol/sei-chain/sei-cosmos/version.BuildTags=netgo,muslc,ledger"
- -linkmode=external
- -extldflags "-Wl,-z,muldefs -static"
goos:
- linux
goarch:
- amd64

archives:
- id: seid
formats: [tar.gz]
name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
files:
- LICENSE*
- README.md
- CHANGELOG*

checksum:
name_template: 'checksums.txt'
algorithm: sha256

snapshot:
version_template: '{{ incpatch .Version }}-snapshot-{{ .ShortCommit }}'

changelog:
use: github
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^chore:'
- 'merge conflict'
- Merge pull request
- Merge remote-tracking branch
- Merge branch

release:
github:
owner: sei-protocol
name: sei-chain
draft: true
prerelease: auto
mode: append
name_template: '{{ .Tag }}'
header: |
# Sei {{ .Tag }}

Pre-built **statically-linked** `seid` binary attached below for `linux/amd64`.

Verify your download:

```
sha256sum -c checksums.txt --ignore-missing
```

For Docker images, see `ghcr.io/sei-protocol/sei`.
footer: |
**Full Changelog**: https://github.com/sei-protocol/sei-chain/compare/{{ .PreviousTag }}...{{ .Tag }}
33 changes: 33 additions & 0 deletions scripts/check-libwasmvm-static.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# Verifies that the static libwasmvm artefacts required for a static `seid`
# build are present. The .a files are produced by `make release-build-alpine`
# in sei-wasmvm and are checked into sei-wasmvm/internal/api/.
#
# Used by .goreleaser.yaml as a `before:` hook so a release tag fails fast
# when the artefacts are missing rather than producing a broken binary.

set -euo pipefail

repo_root="$(git rev-parse --show-toplevel)"
api_dir="$repo_root/sei-wasmvm/internal/api"

required=(
"$api_dir/libwasmvm_muslc.a"
"$api_dir/libwasmvm_muslc.aarch64.a"
)

missing=0
for f in "${required[@]}"; do
if [[ ! -f "$f" ]]; then
echo "::error::missing static libwasmvm artefact: $f"
missing=1
fi
done

if [[ $missing -eq 1 ]]; then
echo "::error::run 'make release-build-alpine' inside sei-wasmvm/ to (re)produce them"
exit 1
fi

echo "All required static libwasmvm artefacts present:"
ls -la "${required[@]}"
Loading