diff --git a/.gitea/workflows/prepare-release.yml b/.gitea/workflows/prepare-release.yml index 298038d..9561cb3 100644 --- a/.gitea/workflows/prepare-release.yml +++ b/.gitea/workflows/prepare-release.yml @@ -62,7 +62,13 @@ jobs: - name: Prepare release files run: | set -euo pipefail - ./script/prepare-release.sh "$RELEASE_VERSION" + go run ./cmd/vociferate \ + --root . \ + --version "$RELEASE_VERSION" \ + --date "$(date -u +%F)" \ + --version-file internal/vociferate/version/version.go \ + --version-pattern 'const String = "([^"]+)"' \ + --changelog changelog.md - name: Run tests run: | @@ -181,15 +187,11 @@ jobs: normalized_version="${RELEASE_VERSION#v}" mkdir -p dist - for target in darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 windows/amd64 windows/arm64; do + for target in linux/amd64 linux/arm64; do os="${target%/*}" arch="${target#*/}" - ext="" - if [[ "$os" == "windows" ]]; then - ext=".exe" - fi - bin="vociferate_${normalized_version}_${os}_${arch}${ext}" + bin="vociferate_${normalized_version}_${os}_${arch}" GOOS="$os" GOARCH="$arch" go build -trimpath -ldflags="-s -w" -o "dist/${bin}" ./cmd/vociferate done diff --git a/README.md b/README.md index 1507aa5..b3b9a73 100644 --- a/README.md +++ b/README.md @@ -56,14 +56,10 @@ just go-test ## Release Artifacts -The `Prepare Release` workflow creates a release and uploads prebuilt `vociferate` binaries for: +Releases are prepared through the `Prepare Release` workflow. The workflow creates a release and uploads prebuilt `vociferate` binaries for: -- `darwin/amd64` -- `darwin/arm64` - `linux/amd64` - `linux/arm64` -- `windows/amd64` -- `windows/arm64` It also uploads `checksums.txt` for integrity verification. If a release already exists for the same tag, the workflow updates its release notes and replaces matching asset filenames so reruns stay in sync. diff --git a/changelog.md b/changelog.md index 9167994..9b1f555 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,8 @@ A `### Breaking` section is used in addition to Keep a Changelog's standard sect ### Changed +- Release preparation now runs directly in the release workflow; the repository-local helper script and just recipe were removed. +- Release artifacts are now limited to `linux/amd64` and `linux/arm64` binaries plus `checksums.txt`. - The CLI entrypoint, internal package paths, build outputs, and automation references now use the `vociferate` name instead of the earlier `releaseprep` naming. - The release workflow and composite action now treat a provided `version` as an override and otherwise fall back to the recommended next version automatically. - Release creation is now idempotent: existing releases for the same tag are updated in place instead of recreated. diff --git a/justfile b/justfile index 11e22f4..554e3ae 100644 --- a/justfile +++ b/justfile @@ -9,6 +9,3 @@ go-build: go-test: go test ./... - -prepare-release version: - ./script/prepare-release.sh "{{version}}" diff --git a/script/prepare-release.sh b/script/prepare-release.sh deleted file mode 100755 index 1d355c0..0000000 --- a/script/prepare-release.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [[ $# -ne 1 ]]; then - echo "usage: $0 " >&2 - exit 2 -fi - -repo_root="$(cd "$(dirname "$0")/.." && pwd)" -release_date="$(date -u +%F)" - -go run ./cmd/vociferate \ - --root "$repo_root" \ - --version "$1" \ - --date "$release_date" \ - --version-file internal/vociferate/version/version.go \ - --version-pattern 'const String = "([^"]+)"' \ - --changelog changelog.md