# 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. The artifact set is exactly what tools/release.sh --cross # produces: host (Apple Silicon) + x86_64 macOS + static-musl Linux + # RHEL 8-compatible linux-gnu + Windows binaries for both lucisv and # lucisv-server, the platform-independent .vsix, and SHA256SUMS. # # 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 } - 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