mirror of
https://github.com/lukaszraczylo/shared-actions.git
synced 2026-11-03 07:44:04 +00:00
Compare commits
2
Commits
fb34ae51e5
...
a4cf065ea1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4cf065ea1 | ||
|
|
58ab34e4cf |
@@ -33,6 +33,18 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
# Fold any build-time source changes (e.g. version stamping by a
|
||||||
|
# repo-local workflow-prepare.sh) into the tagged commit. This is needed
|
||||||
|
# so consumers that fetch the tag's SOURCE — e.g. Yaegi-interpreted
|
||||||
|
# Traefik plugins, which Traefik never compiles — see the stamped value,
|
||||||
|
# and so GoReleaser's `release --clean` sees a clean working tree. The
|
||||||
|
# commit is reachable only via the tag; the branch is NOT advanced, so a
|
||||||
|
# source-tree placeholder (e.g. 0.0.0-dev on main) is preserved. No-op
|
||||||
|
# when the tree is already clean → unchanged for repos that don't stamp.
|
||||||
|
if ! git diff --quiet || ! git diff --cached --quiet; then
|
||||||
|
git add -A
|
||||||
|
git commit -m "chore(release): ${{ inputs.version-tag }}"
|
||||||
|
fi
|
||||||
git tag -a ${{ inputs.version-tag }} -m "Release ${{ inputs.version-tag }}" || true
|
git tag -a ${{ inputs.version-tag }} -m "Release ${{ inputs.version-tag }}" || true
|
||||||
if [[ "${{ inputs.mode }}" != "split" ]]; then
|
if [[ "${{ inputs.mode }}" != "split" ]]; then
|
||||||
git push origin ${{ inputs.version-tag }} || true
|
git push origin ${{ inputs.version-tag }} || true
|
||||||
|
|||||||
@@ -109,6 +109,14 @@ jobs:
|
|||||||
lfs: ${{ inputs.lfs }}
|
lfs: ${{ inputs.lfs }}
|
||||||
|
|
||||||
- name: Run workflow prepare script
|
- 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
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ -f "./workflow-prepare.sh" ]; then
|
if [ -f "./workflow-prepare.sh" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user