Skip to content

ci: Add the CRAN release workflows from krlmlr/r-release-actions - #626

Merged
krlmlr merged 2 commits into
mainfrom
claude/release-workflows
Nov 29, 2026
Merged

krlmlr merged 2 commits into
mainfrom
claude/release-workflows

Conversation

@krlmlr

@krlmlr krlmlr commented Nov 28, 2026

Copy link
Copy Markdown
Member

This adds four workflows that call the reusable workflows of krlmlr/r-release-actions to carry a CRAN release:

  • release-gate.yaml checks that a commit is ready for a CRAN release (hard failures for what CRAN requires, a report for what it expects) and keeps one comment on the checklist pull request.
  • builders.yaml uploads the tarball checked by R-CMD-check.yaml to win-builder (R-devel by default) and macbuilder, and reports on the checklist pull request.
  • cran-submission.yaml submits the tarball that a green R-CMD-check.yaml run on the same commit built and uploaded, writing a draft release and no tag; its header documents the release process.
  • release-status.yaml finishes a release once Posit's package manager serves the version: it tags, publishes the draft release, commits the development bump and merges the release pull request.

All four run only on dispatch, and release-status.yaml also nightly, where it does nothing without a draft release. Each job is guarded to r-dbi/RPostgres, so it is skipped in forks, and each grants only the permissions the reusable workflow needs.

The files mirror r-dbi/RSQLite's copies, with the package name, repository guard, gh commands, CRAN check-page and r-universe URLs and NEWS.md heading examples changed to RPostgres. R-CMD-check.yaml is identical to RSQLite's and already has the cran-submission dispatch input and the source-tarball job the gate, builders and submission rely on, so no existing workflow changes.

Session: https://claude.ai/code/session_01Hr1rd6UQT1YMBMS1pVwH4X


Generated by Claude Code

krlmlr commented Nov 28, 2026

Copy link
Copy Markdown
Member Author

Question: Should the reusable workflows be pinned instead of tracking @main?

All four callers use krlmlr/r-release-actions/...@main, as r-dbi/RSQLite does today: builders.yaml:26, cran-submission.yaml:68, release-gate.yaml:18, release-status.yaml:24. The upstream README recommends pinning by <sha> # vX.Y.Z. Two of these jobs hold contents: write, so a change on upstream main would run here with write access, unreviewed. Pinning a SHA means a bump PR for every upstream change, and RPostgres and RSQLite would drift apart unless both are pinned. Upstream has no tagged release yet.

  • Keep @main for now, like RSQLite, and pin both packages together once r-release-actions tags a release (recommended)
  • Pin to the current upstream SHA (0200cf4e) in this PR
  • Pin both RPostgres and RSQLite to a SHA now, with RSQLite in a separate PR

The clean review rated this Medium, with high confidence. If nobody decides, @main stays.


Generated by Claude Code

krlmlr commented Nov 28, 2026

Copy link
Copy Markdown
Member Author

Question: How should the submission be protected from picking an uncompressed tarball?

The cran-submission.yaml call passes only sha. The reusable workflow then takes the tarball from the newest green push or dispatch run of R-CMD-check.yaml on that commit. Nothing upstream checks that the tarball came from a run dispatched with cran-submission=true, which is the run that recompresses it with pigz. A grep for pigz/recompress in r-release-actions finds nothing. So a later run on the same commit without that input would win, and its plain tarball would be submitted. Examples are a push run on main on the fast path, or a fledge dispatch.

The release branch gets no push runs, so the default path is mostly safe as long as nobody dispatches a plain check on the release head after the cran-submission one. The same applies to RSQLite.

  • Fix it upstream in r-release-actions: refuse a tarball whose .tar.gz.json sidecar does not say recompressed. This PR stays as it is (recommended)
  • Add a check-run-id dispatch input here and pass it through, which needs the upstream input first
  • Accept it: the release session dispatches in the documented order only

The clean review rated this Medium, with medium confidence. If nobody decides, it stays a documented ordering rule.


Generated by Claude Code

krlmlr commented Nov 28, 2026 •

Copy link
Copy Markdown
Member Author

Accepted limitations

These are the Low findings from the clean review, accepted as they stand. Untick one to have it fixed.

  • release-status.yaml:29 passes ${{ inputs.dry-run == true }}, while the other three pass the bare input. Both are correct: on a scheduled run there are no inputs, and the comparison yields false. The form is kept identical to RSQLite's. Relevance low, confidence high.
  • release-status.yaml:24 makes the fast path's development bump with GITHUB_TOKEN. That push fails if main's protection requires reviews or checks the token cannot satisfy, and it starts no CI. The workflow then leaves the bump to the maintainer with a comment, as designed. Relevance low, confidence medium.

The two Medium findings are questions above: pinning and the tarball selection.


Generated by Claude Code

@krlmlr
krlmlr marked this pull request as ready for review November 28, 2026 07:28
@krlmlr
krlmlr merged commit 5c977fb into main Nov 29, 2026
9 checks passed
@krlmlr
krlmlr deleted the claude/release-workflows branch November 29, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants