Skip to content

Commit

Permalink
Merge pull request ethereum#6 from flashbots/release-action
Browse files Browse the repository at this point in the history
add image release workflow
  • Loading branch information
lthibault authored Jan 25, 2024
2 parents 33e520a + 7ff6877 commit 7141a37
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 22 deletions.
26 changes: 4 additions & 22 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

accounts/usbwallet @karalabe
accounts/scwallet @gballet
accounts/abi @gballet @MariusVanDerWijden
cmd/clef @holiman
consensus @karalabe
core/ @karalabe @holiman @rjl493456442
eth/ @karalabe @holiman @rjl493456442
eth/catalyst/ @gballet
eth/tracers/ @s1na
graphql/ @s1na
les/ @zsfelfoldi @rjl493456442
light/ @zsfelfoldi @rjl493456442
node/ @fjl
p2p/ @fjl @zsfelfoldi
rpc/ @fjl @holiman
p2p/simulations @fjl
p2p/protocols @fjl
p2p/testing @fjl
signer/ @holiman
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# they will be requested for review when someone opens a pull request.
* @ferranbt @Ruteri @metachris @dmarzzz @lthibault
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# .github/workflows/release.yml
name: release

on:
workflow_dispatch:
push:
tags:
- "*"

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

- name: setup dependencies
uses: actions/setup-go@v2

- name: Login to Docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.FLASHBOTS_DOCKERHUB_USERNAME }}
password: ${{ secrets.FLASHBOTS_DOCKERHUB_TOKEN }}

- name: Log tag name
run: echo "Build for tag ${{ github.ref_name }}"

- name: Create release
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
111 changes: 111 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
env:
- CGO_ENABLED=1
builds:
- id: suave-execution-geth-darwin-amd64
binary: suave-execution-geth
main: ./cmd/geth
goarch:
- amd64
goos:
- darwin
env:
- CC=o64-clang
- CXX=o64-clang++
flags:
- -trimpath
- id: suave-execution-geth-darwin-arm64
binary: suave-execution-geth
main: ./cmd/geth
goarch:
- arm64
goos:
- darwin
env:
- CC=oa64-clang
- CXX=oa64-clang++
flags:
- -trimpath
- id: suave-execution-geth-linux-amd64
binary: suave-execution-geth
main: ./cmd/geth
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
goarch:
- amd64
goos:
- linux
flags:
- -trimpath
ldflags:
- -extldflags "-Wl,-z,stack-size=0x800000 --static"
tags:
- netgo
- osusergo
- id: suave-execution-geth-linux-arm64
binary: suave-execution-geth
main: ./cmd/geth
goarch:
- arm64
goos:
- linux
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
flags:
- -trimpath
ldflags:
- -extldflags "-Wl,-z,stack-size=0x800000 --static"
tags:
- netgo
- osusergo
- id: suave-execution-geth-windows-amd64
binary: suave-execution-geth
main: ./cmd/geth
goarch:
- amd64
goos:
- windows
env:
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
flags:
- -trimpath
- -buildmode=exe

archives:
- id: w/version
builds:
- suave-execution-geth-darwin-amd64
- suave-execution-geth-darwin-arm64
- suave-execution-geth-linux-amd64
- suave-execution-geth-linux-arm64
- suave-execution-geth-windows-amd64
name_template: "suave-execution-geth_v{{ .Version }}_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: false
format: zip
files:
- none*

dockers:
- dockerfile: ./Dockerfile.suave
use: buildx
goarch: amd64
goos: linux
build_flag_templates:
- --platform=linux/amd64
image_templates:
- "flashbots/suave-execution-geth:{{ .ShortCommit }}"
- "flashbots/suave-execution-geth:{{ .Tag }}"
- "flashbots/suave-execution-geth:latest"

checksum:
name_template: "checksums.txt"

release:
draft: true
header: |
# 🚀 Features
# 🎄 Enhancements
# 🐞 Notable bug fixes
# 🎠 Community
7 changes: 7 additions & 0 deletions Dockerfile.suave
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM debian:bullseye
LABEL "org.opencontainers.image.source"="https://github.com/flashbots/suave-execution-geth"

COPY ./suave-execution-geth /bin/

EXPOSE 8545 8546 30303 30303/udp
ENTRYPOINT ["suave-execution-geth"]
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,16 @@ devtools:
env GOBIN= go install ./cmd/abigen
@type "solc" 2> /dev/null || echo 'Please install solc'
@type "protoc" 2> /dev/null || echo 'Please install protoc'

release:
docker run \
--rm \
-e CGO_ENABLED=1 \
-e GITHUB_TOKEN="$(GITHUB_TOKEN)" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(HOME)/.docker/config.json:/root/.docker/config.json \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:v1.19.5 \
release --clean

0 comments on commit 7141a37

Please sign in to comment.