Skip to content

Use go-version 1.24.x in sanity check in CI (#50) #15

Use go-version 1.24.x in sanity check in CI (#50)

Use go-version 1.24.x in sanity check in CI (#50) #15

Workflow file for this run

name: "Release reproducible (r10e) r10edocker binaries"
on:
push:
tags:
- 'v*'
env:
# Must match "project_name" in "config.json"
PROJECT_NAME: go-r10e-docker
jobs:
release-r10e-binaries:
name: "Release r10e r10edocker"
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4.2.2
with:
# Fetch all history for all tags and branches
fetch-depth: 0
- name: "Set env"
run: |
set -euxo pipefail
# set RELEASE_VERSION as tag version
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: "Build r10e apps at tagged revision"
run: |
set -euxo pipefail
cd ${{ github.workspace }}
git checkout tags/v"${RELEASE_VERSION}" -b v"${RELEASE_VERSION}"
make r10e-build
- name: "Ensure app version matches tag version"
run: |
set -euxo pipefail
cd ${{ github.workspace }}
gunzip -c ./r10e-build/r10edocker-linux-amd64.gz >r10edocker.tmp
chmod +x r10edocker.tmp
APP_VERSION="$(./r10edocker.tmp --version | rev | cut -f1 -d' ' | rev)"
if [ "$APP_VERSION" != "$RELEASE_VERSION" ]; then
echo "error: app version must equal tagged release version"
exit 1
fi
- name: "Release versioned"
# v1.14.0
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5
with:
allowUpdates: true
generateReleaseNotes: true
artifacts: "r10e-build/*"
token: ${{ secrets.GITHUB_TOKEN }}