Skip to content

Testing release workflow #9

Testing release workflow

Testing release workflow #9

name: Release
run-name: "Testing release workflow"
env:
APPLICATION: "test-app"
GOLANG_BUILDER_VERSION: "1.22-bookworm"
TARGET_BASE_VERSION: "bookworm-20240722"
PACKAGE_NAME: "github.com/erigontech/erigon"
DOCKERHUB_REPOSITORY: "erigontech/dev-erigon"
BUILD_TAGS: "nosqlite,noboltdb,nosilkworm"
VERSION: "2.65.4"
VERSION_TMP: ".."
on:
push:
#branches-ignore:
# - '**'
#branches:
# - 'master'
#tags:
## only trigger on release tags:
#- 'v*.*.*'
#- 'v*.*.*-*'
workflow_dispatch:
inputs:
release_version:
required: true
type: string
description: 'Release version number (v#.#.#) which will be used to checkout branch'
dry_run:
required: true
type: boolean
description: 'dry_run: when dry_run is set then no artifacts are published and only a draft of the release notes created'
jobs:
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.arch }}
strategy:
matrix:
include:
- arch: linux/amd64/v2
id: linux-amd64-v2
goos: linux
goarch: amd64
flags_cc: x86_64-linux-gnu-gcc
flags_cxx: x86_64-linux-gnu-g++
build_dst: build-linux-amd64
- arch: linux/arm64
id: linux-arm64
goos: linux
goarch: arm64
flags_cc: aarch64-linux-gnu-gcc
flags_cxx: aarch64-linux-gnu-g++
build_dst: build-linux-arm64
steps:
- name: Checkout github repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Debug
run: |
echo The value of dry_run is ${{ inputs.dry_run}} and the value of the release_version is ${{ inputs.release_version }}
- name: Build binary
run: |
docker run --rm --platform ${{ matrix.arch }} \
-e GOOS=${{ matrix.goos }} -e GOARCH=${{ matrix.goarch }} \
-w /app1 -v $(pwd):/app1 golang:${{ env.GOLANG_BUILDER_VERSION }} \
/bin/bash -c "git config --global --add safe.directory . ; cd src; go build main.go; ls -lao"
- name: Debug 2
run: |
pwd
find . -ls