Skip to content

gdam publish can no longer publish: registry moved to trusted publishing (OIDC); deprecate or rework the command #17

Open

Description

@nicodes

What changed

aviorstudio/gdam-be#205 turned the registry into a pure index. POST /api/v1/publish now requires the publisher to send the release facts (github_release_id, commit_sha, asset_id, asset_name, sha256, asset_size, published_at, prerelease) and authenticates by a GitHub Actions OIDC token for audience api.gdam.dev. The secret-key path still exists but is deprecated and also requires the facts; the pre-cutover body (secret_key, owner, addon, tag_name, asset_name) is answered with 400. Contract: gdam-be/publishing.md in nicodes/docs (PR nicodes/docs#93).

Effect on this CLI

gdam publish @owner/addon TAG [ASSET] (internal/commands/publish.go, gdamdb.PublishReleaseInput) sends exactly the pre-cutover body with GDAM_SECRET_KEY, so v0.0.8 gdam publish fails against the live registry with 400 and cannot publish anything. gdam install / resolve are unaffected (resolve gained only additive fields: download_url, browser_download_url, asset_size, publisher, provenance).

CI publishing moved to aviorstudio/gdam-actions/publish (from the v0.3.0 line, aviorstudio/gdam-actions#24), which reads the release with gh, hashes the asset and posts the facts with the job's OIDC token. It no longer needs the CLI.

Recommendation

Deprecate gdam publish rather than keep a broken command:

  1. Next release: make gdam publish exit non-zero with a message pointing at aviorstudio/gdam-actions/publish and the OIDC contract, and drop GDAM_SECRET_KEY from the README (## Publishing Addons, env table).
  2. Optionally keep a secret-key fallback for humans only if it is reworked to read the release facts from GitHub itself (GET repos/{owner}/{repo}/releases/tags/{tag}, commits/{tag}, download + sha256) and send them with the key, accepting the Deprecation: true response. Note that a CLI run outside Actions has no OIDC token, so this is the only path left for a non-Actions publisher, and the registry operator can disable it with GDAM_SECRET_KEY_PUBLISH=disabled.
  3. gdam install may later use download_url / browser_download_url and drop its own api.github.com re-check, but nothing requires it.

No code in this issue; it records the contract change for whoever picks the CLI up next.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions