Skip to content

Merge branch 'main' into testnet #57

Merge branch 'main' into testnet

Merge branch 'main' into testnet #57

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: true
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Docker Layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx
restore-keys: ${{ runner.os }}-buildx-
- name: Build and Push
uses: docker/bake-action@v4
env:
REGISTRY: ghcr.io
REPOSITORY: ${{ github.repository }}
GIT_COMMIT: ${{ github.sha }}
GIT_VERSION: ${{ github.ref_name }}
IMAGE_TAGS: ${{ github.ref_name }}
with:
files: docker-bake.hcl
push: true
set: |
*.platform=linux/amd64,linux/arm64
*.cache-from=type=local,src=/tmp/.buildx-cache
*.cache-to=type=local,dest=/tmp/.buildx-cache,mode=max
binaries.output=type=local,dest=./binaries
- name: Check version label
run: 'binaries/linux_amd64/geth version | grep -q "Version: $(echo ${{ github.ref_name }} | cut -c 2-10)"'
- name: Compress Binaries
run: |
(cd binaries/linux_amd64 && zip -q - geth) > geth-${{ github.ref_name }}-linux-amd64.zip
(cd binaries/linux_arm64 && zip -q - geth) > geth-${{ github.ref_name }}-linux-arm64.zip
- name: Create genesis.zip
run: zip -r genesis.zip genesis
- name: Create setup.sh
run: |
sed -e 's#__REPOSITORY__#${{ github.repository }}#' .github/setup_template.sh | \
sed -e 's#__RELEASE__#${{ github.ref_name }}#' > setup.sh
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.ref_name }}
path: |
geth-*.zip
genesis.zip
setup.sh
release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: ${{ github.ref_name }}
path: artifacts
- name: Create sha256sums.txt
run: (cd artifacts && sha256sum *) > sha256sums.txt
- name: Create Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: true
files: |
artifacts/*
sha256sums.txt