Skip to content

feat(r2-upload): add hold_period input for release gating#82

Merged
emmanuelm41 merged 4 commits intomainfrom
feat/r2-hold-period
Apr 6, 2026
Merged

feat(r2-upload): add hold_period input for release gating#82
emmanuelm41 merged 4 commits intomainfrom
feat/r2-hold-period

Conversation

@emmanuelm41
Copy link
Copy Markdown
Member

Value

  • Release safety gate — new optional hold_period input allows consumers to enforce a minimum age on GitHub Releases before R2 upload proceeds
  • Zero breaking changes — defaults to 0 (no hold), so all existing consumers work identically

Technical

  • Modified .github/workflows/_cloudflare-r2-upload.yaml to add hold_period input (number, default 0)
  • Added "Check release hold period" step between release download and upload preparation
  • Only activates when source_type == 'release' AND hold_period > 0
  • Uses gh release view to get release creation timestamp, fails with clear message showing remaining wait time
  • All GitHub context expressions passed via env: variables (no direct interpolation in run: blocks)

Adds an optional `hold_period` input (minutes) to the R2 upload
reusable workflow. When set and source_type is 'release', checks
the GitHub Release creation timestamp and fails if the release
is younger than the configured minutes.

- Defaults to 0 (no hold) for full backward compatibility
- Clear failure message with remaining wait time and re-run instructions
- Uses env vars instead of direct expression interpolation in run blocks
…n time

The release is created early in the pipeline, but assets are uploaded
as each platform build finishes (30-40 min later). Checking against
release creation time means the hold is already satisfied by the time
the upload job runs.

Now checks the most recent release asset's updatedAt timestamp,
so hold_period measures time since the last binary was uploaded.
…check

Replace 50-line inline bash hold check with composite action call.
The release-hold action handles release tag resolution, asset timestamp
lookup, and age comparison internally.
Add hold_artifact_name input and artifacts-mode hold check step.
When hold_artifact_name is provided, uses the artifact anchor to
check creation time. Otherwise falls back to run-start anchor.
The hold_period input now works for both source types.
@emmanuelm41 emmanuelm41 merged commit 34648bd into main Apr 6, 2026
1 check passed
@emmanuelm41 emmanuelm41 deleted the feat/r2-hold-period branch April 6, 2026 23:09
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.

1 participant