Skip to content

Release 🚢

Release 🚢 #5

Workflow file for this run

name: Release 🚢
on:
workflow_dispatch:
inputs:
tag:
description: "The tag to release."
required: true
jobs:
cometbft:
runs-on: [ubuntu-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v5
with:
repository: "cometbft/cometbft"
ref: ${{ github.event.inputs.tag }}
fetch-depth: 0
- name: Patch .goreleaser.yml
run: |
rm .goreleaser.yml
cat <<'EOF' > .goreleaser.yml
project_name: cometbft
env:
# Require use of Go modules.
- GO111MODULE=on
builds:
- id: "cometbft"
main: ./cmd/cometbft/main.go
ldflags:
- -s -w -X github.com/cometbft/cometbft/version.TMCoreSemVer={{ .Version }}
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm
- arm64
checksum:
name_template: SHA256SUMS-{{.Version}}.txt
algorithm: sha256
release:
github:
owner: heliaxdev
name: cometbft
prerelease: auto
name_template: "v{{.Version}}"
archives:
- files:
- LICENSE
- README.md
- UPGRADING.md
- SECURITY.md
- CHANGELOG.md
EOF
- run: echo "GO_VERSION=$(cat .github/workflows/go-version.env | grep GO_VERSION | cut -d '=' -f2)" >> $GITHUB_ENV
- uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
- name: Release
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}