Skip to content

Testing release workflow #13

Testing release workflow

Testing release workflow #13

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: Set up QEMU
uses: docker/setup-qemu-action@v3
- 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 for the platform ${{ matrix.arch }}
run: |
docker run --rm --platform ${{ matrix.arch }} \
-e GOOS=${{ matrix.goos }} -e GOARCH=${{ matrix.goarch }} \
-w /app1/src -v $(pwd):/app1 golang:${{ env.GOLANG_BUILDER_VERSION }} \
/bin/bash -c "git config --global --add safe.directory . ; go build main.go; ls -lao"
- name: Compress Artifact for the platform ${{ matrix.arch }}
run: |
tar czvf ./${{ env.APPLICATION}}-${{ matrix.id }}.tar.gz src/main
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}:${{ env.APPLICATION}}-${{ matrix.id }}
path: ./${{ env.APPLICATION}}-${{ matrix.id }}.tar.gz
retention-days: 1
compression-level: 0
if-no-files-found: error
- name: Debug 2
run: |
pwd
find . -ls
publish-artifacts:
runs-on: ubuntu-latest
name: Publish artifacts
steps:
- nane: Download all available Artifacts

Check failure on line 101 in .github/workflows/testing-release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/testing-release.yml (Line: 101, Col: 9): Unexpected value 'nane'
uses: actions/download-artifact@v4
with:
path: ${{ env.APPLICATION }}
pattern: "${{ github.sha }}:"
- name: Debug output
run: find . -ls