Skip to content

Self-hosted workflows for coding-agent delivery. Orchestrate CodeBuddy, Codex and Claude Code with scripts and human approval gates. Includes Local workflows for coding assistants.

ci: allow retrying releases from existing tags (#11)

Robert06221eb65c49a3ff
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 164afdc8..607f30c1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -4,6 +4,12 @@ on:
push:
tags:
- "v*.*.*"
+ workflow_dispatch:
+ inputs:
+ source_ref:
+ description: "Existing release tag to publish (for example v0.1.0)"
+ required: true
+ type: string
permissions:
contents: write
@@ -20,6 +26,7 @@ jobs:
- uses: actions/[email protected]
with:
fetch-depth: 0
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.source_ref || github.ref }}
- uses: actions/[email protected]
with:
@@ -36,12 +43,18 @@ jobs:
run: |
package_name="$(node -p 'require("./package.json").name')"
package_version="$(node -p 'require("./package.json").version')"
- if [[ "${GITHUB_REF_NAME}" != "v${package_version}" ]]; then
- echo "Tag ${GITHUB_REF_NAME} does not match package version ${package_version}" >&2
+ release_tag="v${package_version}"
+ requested_ref="${GITHUB_REF_NAME}"
+ if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
+ requested_ref="${{ inputs.source_ref }}"
+ fi
+ if [[ "${requested_ref}" != "${release_tag}" ]]; then
+ echo "Release ref ${requested_ref} does not match package version ${package_version}" >&2
exit 1
fi
echo "name=${package_name}" >> "$GITHUB_OUTPUT"
echo "version=${package_version}" >> "$GITHUB_OUTPUT"
+ echo "tag=${release_tag}" >> "$GITHUB_OUTPUT"
- name: Install validation dependencies
run: python3 -m pip install pyyaml==6.0.3
@@ -85,18 +98,19 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ steps.package.outputs.version }}
+ TAG: ${{ steps.package.outputs.tag }}
run: |
release_args=(--title "LoopForge v${VERSION}" --generate-notes)
if [[ "$VERSION" == *-* ]]; then
release_args+=(--prerelease)
fi
- if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
- gh release upload "$GITHUB_REF_NAME" \
+ if gh release view "$TAG" >/dev/null 2>&1; then
+ gh release upload "$TAG" \
dist/release/loopforge-workflow.tar.gz \
dist/release/loopforge-workflow.tar.gz.sha256 \
--clobber
else
- gh release create "$GITHUB_REF_NAME" \
+ gh release create "$TAG" \
dist/release/loopforge-workflow.tar.gz \
dist/release/loopforge-workflow.tar.gz.sha256 \
"${release_args[@]}"