Files
lucisv/.gitea/workflows/release.yml
T
lucioandClaude Fable 5 cebb333bd7 All-platforms VSIX + the release flow consolidated in one script
A 7th package, lucisv-<v>-all.vsix, carries every platform's binary
pair under bin/<platform>-<arch>/ and the extension picks the right one
at runtime — flat bin/ (platform package) first, then the platform-arch
subdirectory, then PATH. Target-less on purpose, so Alpine and anything
else vsce refuses to name gets working static binaries. The release.yml
inline prune step moves into tools/prune_release_assets.sh, which now
requires all seven packages by name before anything is published.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-27 02:03:10 -07:00

50 lines
2.2 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
- name: Create the release and attach the artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: tools/publish_release.sh "$GITHUB_REF_NAME" dist