Skip to content
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

Add relase #61

Closed
wants to merge 1 commit into from
Closed
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
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
branches-ignore:
- "**"
tags:
- "v*.*.*"
# to be used by fork patch-releases ^^
- "v*.*.*-*"

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.20.x

- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}

- name: Run GoReleaser
run: |
make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.prepare.outputs.tag_name }}
57 changes: 57 additions & 0 deletions .goreleaser-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
project_name: suave
builds:
- id: darwin-arm64
main: ./cmd/geth
binary: suave
goos:
- darwin
goarch:
- arm64
env:
- CC=oa64-clang
- CXX=oa64-clang++
tags:
- netgo
ldflags: -s -w

- id: darwin-amd64
main: ./cmd/geth
binary: suave
goos:
- darwin
goarch:
- amd64
env:
- CC=o64-clang
- CXX=o64-clang++
tags:
- netgo
ldflags: -s -w

- id: linux-amd64
main: ./cmd/geth
binary: suave
goos:
- linux
goarch:
- amd64
env:
- CC=gcc
- CXX=g++
tags:
- netgo
ldflags: -s -w -extldflags "-static"

- id: linux-arm64
main: ./cmd/geth
binary: suave
goos:
- linux
goarch:
- arm64
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
tags:
- netgo
ldflags: -s -w -extldflags "-static"
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,13 @@ devnet-up:

devnet-down:
docker-compose -f ./suave/devenv/docker-compose.yml down

release:
docker run \
--rm --privileged \
-e CGO_ENABLED=1 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(HOME)/.docker/config.json:/root/.docker/config.json \
-v `pwd`:/go/src/$(PACKAGE_NAME) -w /go/src/$(PACKAGE_NAME) \
goreleaser/goreleaser-cross:v1.20.5 \
--skip-publish --config .goreleaser-build.yaml --rm-dist --snapshot
Loading