Establish the Scriptorium release procedure
This commit is contained in:
@@ -11,9 +11,16 @@ steps:
|
||||
version="$CI_COMMIT_TAG"
|
||||
dist="dist"
|
||||
pkg="gitea.maximumdirect.net/eric/scriptorium/cmd/scriptorium"
|
||||
notes="docs/releases/$version.md"
|
||||
|
||||
if [ ! -f "$notes" ]; then
|
||||
printf 'release notes not found: %s\n' "$notes" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf "$dist"
|
||||
mkdir -p "$dist"
|
||||
cp "$notes" "$dist/RELEASE_NOTES.md"
|
||||
|
||||
build_binary() {
|
||||
goos="$1"
|
||||
@@ -22,7 +29,7 @@ steps:
|
||||
output="$dist/scriptorium-$version-$goos-$goarch$suffix"
|
||||
|
||||
CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" \
|
||||
go build -trimpath -ldflags "-s -w -X gitea.maximumdirect.net/eric/scriptorium/internal/buildinfo.Version=$version" \
|
||||
go build -trimpath -ldflags "-s -w" \
|
||||
-o "$output" "$pkg"
|
||||
}
|
||||
|
||||
@@ -38,6 +45,7 @@ steps:
|
||||
from_secret: GITEA_RELEASE_TOKEN
|
||||
files:
|
||||
- dist/scriptorium-*
|
||||
note: dist/RELEASE_NOTES.md
|
||||
checksum: sha256
|
||||
checksum-file: SHA256SUMS
|
||||
checksum-flatten: true
|
||||
|
||||
Reference in New Issue
Block a user