Skip to content

v0.9.7

v0.9.7 #17

name: Build Release Binaries
on:
release:
types:
- created
- edited
permissions:
id-token: write
contents: write
pull-requests: write
actions: write
jobs:
build:
name: Build Release Assets
runs-on: ubuntu-latest
strategy:
matrix:
platform:
[linux-amd64, linux-arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4.1.5
- name: Display Go version
run: go version
- name: Display the release tag
run: |
echo "Release tag: ${{ github.event.release.tag_name }}"
- name: Set up environment for cross-compilation
run: |
IFS="-" read -r GOOS GOARCH <<< "${{ matrix.platform }}"
output_name=./build/bin/geth-${{ matrix.platform }}
echo "Building for $GOOS/$GOARCH..."
env GOOS=$GOOS GOARCH=$GOARCH go build -o $output_name ./cmd/geth
- name: Calculate checksum
run: |
echo "Generating checksum for ${{ matrix.platform }}..."
sha256sum ./build/bin/geth-${{ matrix.platform }} > ./build/bin/geth-${{ matrix.platform }}.sha256
ls -l ./build/bin/geth-${{ matrix.platform }}.sha256
- name: Check if checksum is generated
run: |
echo "Checking checksum existence for ${{ matrix.platform }}..."
ls -l ./build/bin/geth-${{ matrix.platform }}.sha256
continue-on-error: false
- name: Show checksum file content
run: |
echo "Displaying checksum for ${{ matrix.platform }}:"
cat ./build/bin/geth-${{ matrix.platform }}.sha256
continue-on-error: false
- name: Upload binaries and source code to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.release.tag_name }}
file: |
./build/bin/geth-${{ matrix.platform }}*
file_glob: true