9435cc506efa943c8608e6e0f0844f2ada97f02e
The previous fix moved the branch-readiness poll before the .version write, but on at least one runner the poll's curl returned CURLE_WRITE_ERROR (exit 23) immediately. With `set -e`, any non-zero status from a command substitution (`VAR=$(curl ...)`) aborts the script before the retry/echo path runs, so the failure was both deterministic and silent. Refactor the step around an `api_call` helper that wraps curl with `|| rc=$?` and emits `<http_code>|<curl_rc>` plus body, so curl exits never propagate through `set -e`. Other changes: - Create the `next-release` branch explicitly via `POST /branches` instead of relying on the `new_branch` parameter of the CHANGELOG.md PUT. Eliminates the race between branch creation and subsequent writes. - Poll branch readiness after explicit creation. - Fetch file blob SHAs from `next-release` directly (not base). - Every write (CHANGELOG.md, .version, PR) retries 5x with HTTP code, curl exit code, and response body logged on failure.
Shared Workflows
Reusable Gitea Actions workflows for Unbound Software repositories.
Available Workflows
Release.yml
Automated release workflow using git-cliff for changelog generation.
Usage:
name: Release
on:
push:
branches: [main]
jobs:
release:
uses: unboundsoftware/shared-workflows/.gitea/workflows/Release.yml@main
Inputs:
tag_only(boolean, default:false): Set totrueto only create tags without full releases
Requirements:
This workflow reads the release token from /runner-secrets/release-token, which is automatically available on Unbound's Gitea runners. No repository secrets need to be configured.
How it works:
- On each push to the default branch, generates a changelog using git-cliff
- Creates or updates a
next-releasebranch with the updated CHANGELOG.md and .version file - Opens or updates a PR titled "chore(release): prepare for vX.Y.Z"
- When the .version file exists (after merging the release PR), creates a Gitea release with the changelog
Description
Languages
Markdown
100%