Files
lucisv/.gitea/workflows/release.yml
T
lucioandClaude Fable 5 ec65e0831f
ci / checks (push) Successful in 43s
ci / corpus (push) Successful in 20s
CI release publishes the six extension packages only
Owner decision: the release page carries the .vsix packages (each
platform package checked by name — a missing one fails the release —
plus the universal fallback) and SHA256SUMS, nothing else. The loose
binaries are still built and audited on the runner, since the packages
embed them, but no longer attached; standalone binaries are a cargo
build away. The new workflow step prunes dist/ after the audit and
filters SHA256SUMS to the packages, keeping the audited hashes, then
re-verifies. Prune logic tested against the real 0.10.0 dist with a
missing-package negative control; docs trued up in RELEASING.md, the
top-level README and both feature READMEs.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-27 01:07:34 -07:00

63 lines
2.8 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 six .vsix packages —
# the universal one plus darwin-arm64/darwin-x64/linux-x64/linux-arm64/
# win32-x64 with the lucisv + lucisv-server binaries embedded — and
# SHA256SUMS; each platform package is a must, and a missing one fails
# the release. 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 six must exist
# (release.sh would have failed earlier, but a missing package here is
# exactly the failure this release exists to prevent, so it is checked
# by name); the loose binaries were needed to build and audit them and
# are dropped now. SHA256SUMS is filtered, not recomputed — the
# published hashes are the audited ones — and re-verified after.
- name: Keep only the extension packages
run: |
v=${GITHUB_REF_NAME#v}
cd dist
for t in "" -darwin-arm64 -darwin-x64 -linux-x64 -linux-arm64 -win32-x64; do
[ -f "lucisv-$v$t.vsix" ] || {
echo "missing lucisv-$v$t.vsix" >&2
exit 1
}
done
grep '\.vsix$' SHA256SUMS > SHA256SUMS.tmp
mv SHA256SUMS.tmp SHA256SUMS
find . -type f ! -name '*.vsix' ! -name SHA256SUMS -delete
shasum -a 256 -c SHA256SUMS
- name: Extract the release notes from CHANGELOG.md
run: tools/release_notes.sh "${GITHUB_REF_NAME#v}" > dist/RELEASE_NOTES.md
- name: Create the release and attach the artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: tools/publish_release.sh "$GITHUB_REF_NAME" dist