Merge tag 'v1.4.0' into release/polygon-1.x-fh2.4 #226
Workflow file for this run
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
name: Release | |
on: | |
push: | |
# Publish `polygon-v1.2.3` tags as releases. | |
tags: | |
- "[a-z0-9]+-v*" | |
- "!**.docker" | |
jobs: | |
build: | |
name: Build Release | |
strategy: | |
matrix: | |
go-version: [1.22.x] | |
os: [ubuntu-20.04, macos-latest] # windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
%LocalAppData%\go-build | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Build Binary for ${{matrix.os}} | |
run: | | |
go mod download | |
make bor | |
cp ./build/bin/bor ./build/bin/geth | |
# - name: Build Binary for ARM | |
# if: matrix.os == 'ubuntu-20.04' | |
# run: | | |
# go mod download | |
# make geth-linux-arm | |
- name: Upload Linux Build | |
uses: actions/upload-artifact@v3 | |
if: matrix.os == 'ubuntu-20.04' | |
with: | |
name: linux | |
path: ./build/bin/geth | |
- name: Upload MacOS Build | |
uses: actions/upload-artifact@v3 | |
if: matrix.os == 'macos-latest' | |
with: | |
name: macos | |
path: ./build/bin/geth | |
# - name: Upload Windows Build | |
# uses: actions/upload-artifact@v3 | |
# if: matrix.os == 'windows-latest' | |
# with: | |
# name: windows | |
# path: ./build/bin/geth.exe | |
# - name: Upload ARM-5 Build | |
# uses: actions/upload-artifact@v3 | |
# if: matrix.os == 'ubuntu-20.04' | |
# with: | |
# name: arm5 | |
# path: ./build/bin/geth-linux-arm-5 | |
# - name: Upload ARM-6 Build | |
# uses: actions/upload-artifact@v3 | |
# if: matrix.os == 'ubuntu-20.04' | |
# with: | |
# name: arm6 | |
# path: ./build/bin/geth-linux-arm-6 | |
# - name: Upload ARM-7 Build | |
# uses: actions/upload-artifact@v3 | |
# if: matrix.os == 'ubuntu-20.04' | |
# with: | |
# name: arm7 | |
# path: ./build/bin/geth-linux-arm-7 | |
# - name: Upload ARM-64 Build | |
# uses: actions/upload-artifact@v3 | |
# if: matrix.os == 'ubuntu-20.04' | |
# with: | |
# name: arm64 | |
# path: ./build/bin/geth-linux-arm64 | |
release: | |
name: Release | |
needs: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set Env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: linux | |
path: ./linux | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: macos | |
path: ./macos | |
# - name: Download Artifacts | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: windows | |
# path: ./windows | |
# - name: Download Artifacts | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: arm5 | |
# path: ./arm5 | |
# - name: Download Artifacts | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: arm6 | |
# path: ./arm6 | |
# - name: Download Artifacts | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: arm7 | |
# path: ./arm7 | |
# - name: Download Artifacts | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: arm64 | |
# path: ./arm64 | |
- name: Generate Change Log | |
id: changelog | |
run: | | |
chmod 755 ./.github/generate_change_log.sh | |
CHANGELOG=$(./.github/generate_change_log.sh ${{ env.RELEASE_VERSION}}) | |
echo "CHANGELOG<<EOF" >> $GITHUB_ENV | |
echo "$CHANGELOG" >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
# Rename assets | |
- run: | | |
mv ./linux/geth ./linux/geth_linux | |
mv ./macos/geth ./macos/geth_macos | |
# mv ./windows/geth.exe ./windows/geth_windows.exe | |
# Check downloaded files | |
- run: ls | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.RELEASE_VERSION }} | |
release_name: ${{ env.RELEASE_VERSION }} | |
body: | | |
${{ env.CHANGELOG }} | |
draft: false | |
prerelease: false | |
files: | | |
./linux/geth_linux | |
./macos/geth_macos | |
# ./arm5/geth-linux-arm-5 | |
# ./arm6/geth-linux-arm-6 | |
# ./arm7/geth-linux-arm-7 | |
# ./arm64/geth-linux-arm64 | |
# ./windows/geth_windows.exe |