This repository has been archived by the owner on Oct 18, 2023. It is now read-only.
forked from erigontech/erigon
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dan moore
authored and
dan moore
committed
Jul 5, 2022
1 parent
6b1971b
commit d9954fa
Showing
6 changed files
with
238 additions
and
1 deletion.
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,42 @@ | ||
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.17.x | ||
|
||
- name: Prepare | ||
id: prepare | ||
run: | | ||
TAG=${GITHUB_REF#refs/tags/} | ||
echo ::set-output name=tag_name::${TAG} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Run GoReleaser | ||
run: | | ||
make release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION: ${{ steps.prepare.outputs.tag_name }} | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKERHUB }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }} |
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 |
---|---|---|
|
@@ -74,4 +74,6 @@ go.work | |
|
||
/goerli | ||
|
||
docker-compose.*.yml | ||
docker-compose.*.yml | ||
|
||
dist |
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,132 @@ | ||
project_name: erigon | ||
|
||
release: | ||
disable: false | ||
draft: true | ||
prerelease: auto | ||
|
||
builds: | ||
- id: darwin-amd64 | ||
main: ./cmd/cli | ||
binary: erigon | ||
goos: | ||
- darwin | ||
goarch: | ||
- amd64 | ||
env: | ||
- CC=o64-clang | ||
- CXX=o64-clang++ | ||
tags: | ||
- netgo | ||
ldflags: | ||
-s -w | ||
|
||
- id: darwin-arm64 | ||
main: ./cmd/cli | ||
binary: erigon | ||
goos: | ||
- darwin | ||
goarch: | ||
- arm64 | ||
env: | ||
- CC=oa64-clang | ||
- CXX=oa64-clang++ | ||
tags: | ||
- netgo | ||
ldflags: | ||
-s -w | ||
|
||
- id: linux-amd64 | ||
main: ./cmd/cli | ||
binary: erigon | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
env: | ||
- CC=gcc | ||
- CXX=g++ | ||
tags: | ||
- netgo | ||
ldflags: | ||
# We need to build a static binary because we are building in a glibc based system and running in a musl container | ||
-s -w -extldflags "-static" | ||
|
||
- id: linux-arm64 | ||
main: ./cmd/cli | ||
binary: erigon | ||
goos: | ||
- linux | ||
goarch: | ||
- arm64 | ||
env: | ||
- CC=aarch64-linux-gnu-gcc | ||
- CXX=aarch64-linux-gnu-g++ | ||
tags: | ||
- netgo | ||
ldflags: | ||
# We need to build a static binary because we are building in a glibc based system and running in a musl container | ||
-s -w -extldflags "-static" | ||
|
||
nfpms: | ||
- vendor: 0xPolygon | ||
homepage: https://polygon.technology | ||
maintainer: Polygon Team <[email protected]> | ||
description: Polygon Blockchain | ||
license: GPLv3 LGPLv3 | ||
|
||
formats: | ||
- apk | ||
- deb | ||
- rpm | ||
|
||
contents: | ||
- src: builder/files/erigon.service | ||
dst: /lib/systemd/system/erigon.service | ||
type: config | ||
|
||
overrides: | ||
rpm: | ||
replacements: | ||
amd64: x86_64 | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}.next" | ||
|
||
dockers: | ||
- image_templates: | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64 | ||
dockerfile: Dockerfile.release | ||
use: buildx | ||
goarch: amd64 | ||
ids: | ||
- linux-amd64 | ||
build_flag_templates: | ||
- --platform=linux/amd64 | ||
|
||
- image_templates: | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64 | ||
dockerfile: Dockerfile.release | ||
use: buildx | ||
goarch: arm64 | ||
ids: | ||
- linux-arm64 | ||
build_flag_templates: | ||
- --platform=linux/arm64/v8 | ||
|
||
docker_manifests: | ||
- name_template: 0xpolygon/{{ .ProjectName }}:{{ .Version }} | ||
image_templates: | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64 | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64 | ||
|
||
- name_template: 0xpolygon/{{ .ProjectName }}:latest | ||
image_templates: | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64 | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64 | ||
|
||
announce: | ||
slack: | ||
enabled: true | ||
# The name of the channel that the user selected as a destination for webhook messages. | ||
channel: '#code-releases' |
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,8 @@ | ||
FROM alpine:3.14 | ||
|
||
RUN set -x \ | ||
&& apk add --update --no-cache \ | ||
ca-certificates \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
EXPOSE 8545 8551 8546 30303 30303/udp 42069 42069/udp 8080 9090 6060 |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[Unit] | ||
Description=erigon | ||
StartLimitIntervalSec=500 | ||
StartLimitBurst=5 | ||
|
||
[Service] | ||
Restart=on-failure | ||
RestartSec=5s | ||
WorkingDirectory=$NODE_DIR | ||
EnvironmentFile=/etc/matic/metadata | ||
ExecStart=/usr/local/bin/erigon $VALIDATOR_ADDRESS | ||
Type=simple | ||
User=$USER | ||
KillSignal=SIGINT | ||
TimeoutStopSec=120 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |