orama/.goreleaser.yaml
anonpenguin23 fb609d66d9 ci: single VERSION file, version guards, goreleaser v2, CI on push
Workflow hardening based on the four-cycle release-debugging session:

Centralized versioning
- Add /VERSION at repo root as single source of truth.
- core/Makefile reads VERSION via `$(shell cat ../VERSION)`.
- Add `make bump VER=X.Y.Z` target that updates /VERSION and syncs
  sdk/package.json in one shot.

Version mismatch guards
- All three release workflows (release.yaml, release-apt.yml,
  publish-sdk.yml) now verify the release tag matches /VERSION at the
  very first step. Stale-VERSION releases fail fast with a clear hint
  to run `make bump`.

GoReleaser v2 migration
- Upgrade goreleaser-action v5 -> v6 (pinned `~> v2`).
- Add `version: 2` to .goreleaser.yaml.
- Migrate to v2 syntax: `archives.format` -> `formats: [...]`,
  `brews.folder` -> `directory`, `snapshot.name_template` ->
  `version_template`, `builds`-style references replaced with `ids:`.
- `before.hooks` can use map syntax again (v2 supports it).

Homebrew tap on stable only
- `brews.skip_upload` is now `'{{ if .Prerelease }}true{{ else }}false{{ end }}'`.
- Stops nightly releases from polluting the tap and from hitting 401
  on stale HOMEBREW_TAP_TOKEN. Stable main releases still publish.

CI on every push
- New ci.yml runs `go vet` + `go test -race` on the core module and
  typecheck/build/unit-tests on the SDK for every push to main/nightly
  and every PR. version-sanity job warns when /VERSION and
  sdk/package.json drift.

Version bump for next pipeline test
- /VERSION: 0.122.8
- sdk/package.json: 0.122.8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 09:49:33 +03:00

166 lines
3.6 KiB
YAML

# GoReleaser v2 Configuration for DeBros Network
# Builds and releases orama (CLI) and orama-node binaries.
# Publishes to: GitHub Releases, Homebrew (stable only), and apt (.deb packages).
version: 2
project_name: orama-network
env:
- GO111MODULE=on
before:
hooks:
- cmd: go mod tidy
dir: core
builds:
# orama CLI binary
- id: orama
dir: core
main: ./cmd/cli
binary: orama
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.commit={{.ShortCommit}}
- -X main.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"
# orama-node binary (Linux only for apt)
- id: orama-node
dir: core
main: ./cmd/node
binary: orama-node
goos:
- linux
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.commit={{.ShortCommit}}
- -X main.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"
archives:
# Tar.gz archives for orama CLI
- id: orama-archives
ids:
- orama
formats: [tar.gz]
name_template: "orama_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- README.md
- LICENSE
# Tar.gz archives for orama-node
- id: orama-node-archives
ids:
- orama-node
formats: [tar.gz]
name_template: "orama-node_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- README.md
- LICENSE
# Debian packages for apt
nfpms:
# orama CLI .deb package
- id: orama-deb
package_name: orama
ids:
- orama
vendor: DeBros
homepage: https://github.com/DeBrosDAO/orama
maintainer: DeBros <dev@debros.io>
description: CLI tool for the Orama decentralized network
license: MIT
formats:
- deb
bindir: /usr/bin
section: utils
priority: optional
contents:
- src: ./README.md
dst: /usr/share/doc/orama/README.md
deb:
lintian_overrides:
- statically-linked-binary
# orama-node .deb package
- id: orama-node-deb
package_name: orama-node
ids:
- orama-node
vendor: DeBros
homepage: https://github.com/DeBrosDAO/orama
maintainer: DeBros <dev@debros.io>
description: Node daemon for the Orama decentralized network
license: MIT
formats:
- deb
bindir: /usr/bin
section: net
priority: optional
contents:
- src: ./README.md
dst: /usr/share/doc/orama-node/README.md
deb:
lintian_overrides:
- statically-linked-binary
# Homebrew tap for macOS (orama CLI only).
# Stable releases only — prereleases (nightly) are skipped so we don't
# pollute the tap or fight a 401 on a missing HOMEBREW_TAP_TOKEN.
brews:
- name: orama
ids:
- orama-archives
repository:
owner: DeBrosDAO
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
directory: Formula
homepage: https://github.com/DeBrosDAO/orama
description: CLI tool for the Orama decentralized network
license: MIT
skip_upload: '{{ if .Prerelease }}true{{ else }}false{{ end }}'
install: |
bin.install "orama"
test: |
system "#{bin}/orama", "--version"
checksum:
name_template: "checksums.txt"
algorithm: sha256
snapshot:
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
abbrev: -1
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"
- "^ci:"
- Merge pull request
- Merge branch
release:
github:
owner: DeBrosDAO
name: orama
draft: false
prerelease: auto
name_template: "Release {{.Version}}"