Files
lucisv/.gitea/workflows/release.yml
T
lucioandClaude Fable 5 58112d4d3b
ci / checks (push) Successful in 58s
ci / corpus (push) Successful in 39s
release: retry uploads past Cloudflare's 524, re-checking the server first; optional direct API URL
0.29.0 and 0.30.0 both died in the publish step with curl: (56) ...
error: 524 - Cloudflare's origin timeout, because GITHUB_SERVER_URL is
the public host and every upload crosses the proxy. tools/
publish_release.sh now retries each upload (UPLOAD_ATTEMPTS, default 5,
backing off) and asks the server what it holds before every retry: an
asset already there at the local size is done, one at another size is a
truncated upload and is deleted before re-sending. LUCISV_API_URL, an
optional repository Actions variable passed through release.yml, names a
direct http://host:port so the API bypasses the proxy; unset, the public
URL is used as before. Mock-tested with a curl stand-in reproducing the
524-then-partial sequence. Work log in docs/features/ci-release.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-09-02 11:13:19 -07:00

55 lines
2.6 KiB
YAML

# Release: pushing a tag `vX.Y.Z` builds every distribution artifact and
# publishes a Gitea release with the CHANGELOG section for that version as
# its notes. What the release page carries is the seven .vsix packages —
# the universal one, the five (darwin-arm64/darwin-x64/linux-x64/
# linux-arm64/win32-x64) with the lucisv + lucisv-server binaries embedded,
# and the all-platforms one carrying every pair at once — plus SHA256SUMS.
# Every package is a must: a missing one fails the release, by name
# (tools/prune_release_assets.sh). The loose binaries are still built for
# every target
# (the packages are made from them) and still audited, but they are not
# attached: anyone who wants a standalone binary builds it with
# `cargo build --release` (docs/features/editor-platform-vsix).
#
# The release fails, deliberately, when the tag does not match the
# workspace version or CHANGELOG.md has no section for it: every release
# ships with real, written notes (see tools/RELEASING.md).
name: release
on:
push:
tags:
- 'v*'
jobs:
build-and-publish:
runs-on: macos-arm64
steps:
- uses: actions/checkout@v4
- name: Build release artifacts for every target
run: tools/release.sh --cross
- name: Audit the cross-built artifacts
run: tools/audit_artifacts.sh dist
- name: Check the tag against the crate version
run: |
v=$(target/release/lucisv --version | awk '{print $2}')
[ "v$v" = "$GITHUB_REF_NAME" ] || {
echo "tag $GITHUB_REF_NAME does not match crate version $v" >&2
exit 1
}
# The release page ships extension packages only: all seven checked by
# name, SHA256SUMS filtered down to them and re-verified, the loose
# binaries (needed to build and audit the packages) dropped.
- name: Keep only the extension packages
run: tools/prune_release_assets.sh dist "${GITHUB_REF_NAME#v}"
- name: Extract the release notes from CHANGELOG.md
run: tools/release_notes.sh "${GITHUB_REF_NAME#v}" > dist/RELEASE_NOTES.md
# LUCISV_API_URL is an optional repository Actions variable naming a
# direct http://host:port for the Gitea API, so the uploads do not go
# through Cloudflare's 100-second origin timeout (0.29.0 and 0.30.0
# both died there with a 524). Unset, the public URL is used.
- name: Create the release and attach the artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LUCISV_API_URL: ${{ vars.LUCISV_API_URL }}
run: tools/publish_release.sh "$GITHUB_REF_NAME" dist