mirror of
https://github.com/lukaszraczylo/shared-actions.git
synced 2026-06-05 22:43:43 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user