From 58ab34e4cfaca70787e2f50dae7e72b10e0a32bb Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sat, 30 May 2026 13:06:13 +0100 Subject: [PATCH] ci: expose computed VERSION/VERSION_TAG to workflow-prepare.sh in release job The release job now passes the calculated semver (bare VERSION and v-prefixed VERSION_TAG) into the repo-local workflow-prepare.sh hook's environment, so a consumer repo can stamp its version into source at build time. Needed for runtimes that cannot resolve their version from build info at runtime (e.g. Yaegi-interpreted Traefik plugins). Additive and backward-compatible: the test/version jobs run the hook without a version, and repos with no hook (or one that ignores VERSION) are unaffected. --- .github/workflows/go-release.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/go-release.yaml b/.github/workflows/go-release.yaml index 0f7314d..3a77e95 100644 --- a/.github/workflows/go-release.yaml +++ b/.github/workflows/go-release.yaml @@ -109,6 +109,14 @@ jobs: lfs: ${{ inputs.lfs }} - name: Run workflow prepare script + # Expose the computed release version to a repo-local workflow-prepare.sh + # (e.g. to stamp the version into source for runtimes that cannot resolve + # it at build time, such as Yaegi-interpreted Traefik plugins). Only the + # release job has a version; the test/version jobs run the hook without + # it. VERSION is the bare semver (1.2.3); VERSION_TAG keeps the v prefix. + env: + VERSION: ${{ needs.version.outputs.version }} + VERSION_TAG: ${{ needs.version.outputs.version_tag }} shell: bash run: | if [ -f "./workflow-prepare.sh" ]; then