The publishing pipeline was already complete — subtree split to the mirror, gem build and push on a warp_engine-v* tag — but it had never been triggered, and after the org reorganization three of its targets were stale: the mirror push URL and the rubygems registry namespace (twice). The gemspec's allowed_push_host has to match the --host that `gem push` receives, so it now carries the full registry URL rather than the bare forge host, plus source and documentation links. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
# Read-only split mirror: a libs/ruby/warp_engine alkönyvtárat kitükrözi a
|
|
# engines/warp_engine repóba (fejlesztés itt, a monorepóban történik; a tükör
|
|
# csak publikálásra való). Tag-elt release (warp_engine-v*) esetén a gem a
|
|
# Forgejo rubygems registry-be is felmegy.
|
|
#
|
|
# Szükséges Woodpecker secret: forge_token — Forgejo access token
|
|
# repository:write (engines/warp_engine) és package:write joggal.
|
|
|
|
when:
|
|
- event: push
|
|
branch: master
|
|
path: "libs/ruby/warp_engine/**"
|
|
- event: manual
|
|
- event: tag
|
|
ref: refs/tags/warp_engine-v*
|
|
|
|
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git
|
|
settings:
|
|
partial: false
|
|
depth: 0 # a subtree splithez teljes history kell
|
|
|
|
steps:
|
|
split-mirror:
|
|
image: alpine/git
|
|
environment:
|
|
FORGE_TOKEN:
|
|
from_secret: forge_token
|
|
commands:
|
|
- apk add --no-cache git-subtree
|
|
- git subtree split --prefix=libs/ruby/warp_engine HEAD -b warp-engine-split
|
|
# a secretbe másolt token végén lehet sortörés — levágjuk
|
|
- TOKEN="$$(printf '%s' "$${FORGE_TOKEN}" | tr -d '[:space:]')"
|
|
- git push --force "https://ci:$${TOKEN}@git.teletypegames.org/engines/warp_engine.git" warp-engine-split:master
|
|
when:
|
|
- event: push
|
|
branch: master
|
|
- event: manual
|
|
|
|
publish-gem:
|
|
image: ruby:3.3-slim
|
|
environment:
|
|
FORGE_TOKEN:
|
|
from_secret: forge_token
|
|
commands:
|
|
- cd libs/ruby/warp_engine
|
|
- gem build warp_engine.gemspec
|
|
- mkdir -p ~/.gem
|
|
- TOKEN="$$(printf '%s' "$${FORGE_TOKEN}" | tr -d '[:space:]')"
|
|
- |
|
|
printf -- '---\n:https://git.teletypegames.org/api/packages/engines/rubygems: Bearer %s\n' "$${TOKEN}" > ~/.gem/credentials
|
|
- chmod 600 ~/.gem/credentials
|
|
- gem push --host https://git.teletypegames.org/api/packages/engines/rubygems warp_engine-*.gem
|
|
when:
|
|
- event: tag
|
|
ref: refs/tags/warp_engine-v*
|