Files
logos-modules-release/.github/workflows/_release-module.yml
Dario LipicarandClaude Opus 4.8 cfd75a6832 Add "Force build" option to all release workflows (#2)
* Add "Force build" option to the release workflows (#5)

"Release all modules" and each per-module "Release <module>" workflow now
take a `force_build` toggle on the Run-workflow form (off by default).
When on, it replaces the current published release even if the version is
unchanged — e.g. the submodule pointer moved while metadata.json#version
stayed the same.

The toggle threads down the existing wrapper chain to the action's
`skip_if_published` input (inverted), so signing config still lives in one
place:

  release-all.yml / release-<module>.yml  --force_build-->
    _release-module.yml  --skip_if_published: !force_build-->
      logos-modules-release-action/release.yml@v1

- _release-module.yml: new `force_build` input -> skip_if_published
- release-all.yml: dispatch input, passed through the matrix fan-out
- release-module.yml.template: dispatch input (so generated per-module
  workflows get it too)
- catalog.sh: matching `--force` flag for `release` / `release-all`
- README: document the toggle

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

* Regenerate per-module release workflows with Force build option

The shared workflow machinery now carries the `force_build` toggle (synced
from logos-modules-release-base via the merge of #5), but the 14 existing
per-module `release-<module>.yml` files were generated from the old
template and still used `workflow_dispatch: {}`. Regenerate them from the
updated template so each per-module "Release <module>" run also exposes the
Force build option (replace the current published release when the version
is unchanged).

Mechanically identical to re-running scripts/add-module.sh's template
substitution; the only change per file is the force_build input + its
passthrough to _release-module.yml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 11:46:49 -03:00

87 lines
3.8 KiB
YAML

name: _release-module
# Local reusable workflow — the single place that owns this catalog's
# signing configuration. Every per-module workflow (release-<repo>.yml)
# and the umbrella (release-all.yml) delegate here, so switching signing
# modes only means editing THIS file, never the callers.
#
# The leading underscore marks it "private": it has only `workflow_call`
# (no `workflow_dispatch`), so it never shows up as a runnable item in
# the Actions UI. It can only be invoked from a sibling workflow via
# `uses: ./.github/workflows/_release-module.yml`.
#
# ── Signing modes ────────────────────────────────────────────────────
# This catalog publishes UNSIGNED (`signing_mode: none`) — matching the
# empty `trustedSigners` in logos-repo.json. Turn on signing when ready:
#
# inline — `lgx sign` runs in the workflow using a JWK secret.
# 1. Generate an Ed25519 JWK private key.
# 2. Add it as the `LOGOS_SIGNING_KEY` Actions secret.
# 3. Uncomment the `signing_mode: inline` line + the
# `secrets:` block below; delete `signing_mode: none`.
# 4. Put the matching public DID in `logos-repo.json`
# under `trustedSigners`.
#
# external — a signing rig you control (Jenkins, HSM, hardware token)
# produces the signed `.lgx`; the key never touches CI.
# Uncomment the external block; `signing_command` runs with
# $LGX_PATH (unsigned input) and must either modify it in
# place or write the signed result to $LGX_SIGNED_OUT.
on:
workflow_call:
inputs:
module_path:
description: "Path to the module submodule (e.g. submodules/<repo>)."
type: string
required: true
force_build:
description: |
Force build — rebuild and REPLACE the already-published
`<module>-v<version>` release instead of skipping it. Maps to
the action's `skip_if_published` (inverted): false (default) =
skip a version that's already fully published; true = republish
the same version, overwriting its assets.
type: boolean
default: false
# Forked repos default to a read-only GITHUB_TOKEN; the downstream
# release job needs to create releases / upload assets.
permissions:
contents: write
jobs:
release:
uses: logos-co/logos-modules-release-action/.github/workflows/release.yml@v1
with:
module_path: ${{ inputs.module_path }}
# Normal runs skip a version that's already fully published; "Force
# build" (force_build: true) republishes it by disabling that skip.
skip_if_published: ${{ !inputs.force_build }}
# ─── Signing mode (edit here, not in each caller) ────────────────
signing_mode: none
# Inline signing — uncomment these two lines (and the `secrets:`
# block at the bottom), then delete `signing_mode: none` above.
#signing_mode: inline
# External signing (Jenkins / HSM / hardware token). Uncomment and
# delete `signing_mode: none`. `signing_command` runs with
# $LGX_PATH pointing at the unsigned `.lgx`; it must modify that
# file in place or write the signed package to $LGX_SIGNED_OUT.
#
# signing_mode: external
# signing_command: |
# curl -fsSL -X POST --data-binary @"$LGX_PATH" \
# -H "X-Build-Id: ${GITHUB_RUN_ID}" \
# -o "$LGX_SIGNED_OUT" \
# "$JENKINS_SIGNING_URL"
# Inline mode reads this; none/external ignore it. Wired via
# `secrets: inherit` from each caller so the per-module files don't
# need to know which secret names matter. Uncomment for inline mode.
#secrets:
# signing_key: ${{ secrets.LOGOS_SIGNING_KEY }}