when: - event: tag steps: - name: build-release-assets image: golang:1.25 commands: - | set -eu 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" goarch="$2" suffix="$3" output="$dist/scriptorium-$version-$goos-$goarch$suffix" CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" \ go build -trimpath -ldflags "-s -w" \ -o "$output" "$pkg" } build_binary linux amd64 "" build_binary linux arm64 "" - name: publish-release image: woodpeckerci/plugin-release depends_on: - build-release-assets settings: api_key: from_secret: GITEA_RELEASE_TOKEN files: - dist/scriptorium-* note: dist/RELEASE_NOTES.md checksum: sha256 checksum-file: SHA256SUMS checksum-flatten: true file-exists: skip overwrite: false prerelease: false