Skip to content

release: also run on its own twice a week when something new was merged - #123

Merged
adssib merged 2 commits into
mainfrom
release-schedule
Nov 19, 2026
Merged

adssib merged 2 commits into
mainfrom
release-schedule

Conversation

@adssib

@adssib adssib commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

The Release workflow now also runs on its own every Monday and Thursday at 14:00 UTC:

  • It makes a patch release.
  • It runs only if something was merged since the last tag. If main's HEAD is already tagged, it logs "nothing merged since vX: no release this time" and stops, with no error and no tag.
  • The same checks run first: the leak guard, gitleaks, build, vet, gofmt and tests. Any failure means no tag.
  • The button stays, for an urgent fix or a minor release (inputs.bump, which defaults to patch).

Why scheduled and not a tag on every merge:

  • Fewer tags: Go's module proxy keeps every version forever, so two releases a week beats one per merge.
  • Fewer bump PRs downstream.
  • No release job on every push to main.

A merged plugin reaches patch-it's hosted ingestion service within a few days.

Docs: the CONTRIBUTING.md Releasing section and table row, and AGENTS.md → Releases.

Checks: the YAML parses and actionlint passes.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
@claude

claude Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Claude finished @adssib's task in 1m 34s —— View job


✅ Ready to merge. The scheduled run is gated correctly: every check still comes before the tag, and when nothing has been merged since the last tag the run exits cleanly. One thing on main needs fixing first, or the first scheduled run will fail (below).

Rules

Rule Status Evidence
Plugin list (docs/plugins.md) n/a No plugin is added, removed or changed. The diff touches only release.yml, AGENTS.md and CONTRIBUTING.md.
Provider page n/a No new provider or source.
Golden test + dated quote n/a No plugin code.
Drop test n/a No plugin code.
Fetch only via env n/a No Go changes.
Nothing private ✅ Nothing private in the diff, commit or PR body. It uses "patch-it's hosted ingestion service" as AGENTS.md asks, and leak_guard.py --all passes.
DCO / commit style ✅ Signed off, co-author trailer kept, subject lowercase and imperative.

Bugs

None found in this PR.

How the new logic behaves:

  • Already-tagged HEAD: a scheduled run sets skip=true and exits 0, and every later step is guarded by steps.version.outputs.skip != 'true'. A manual run still fails loudly, as before.
  • Bump: inputs.bump || 'patch' gives scheduled runs a patch.
  • only from main: still passes on schedule, because github.ref is the default branch.
  • Concurrency: a manual run and a scheduled run at the same moment queue. The second one then finds HEAD tagged and either skips (scheduled) or errors (manual). Both are correct.

⚠️ Fix on main before the first scheduled run: gofmt -l . prints plugins/all/all.go on this branch. That file is identical to origin/main, so this PR didn't cause it. The catalog import sits before apichangelog, which gofmt sorts. The Release gofmt step will fail, so the first scheduled run (and any manual run) will fail and make no tag until it's fixed. A one-line gofmt -w plugins/all/all.go PR fixes it. It may also be worth checking why CI_go let that merge through.

Verified

  • go build ./...: ok
  • go vet ./...: ok, no output
  • gofmt -l .: ❌ prints plugins/all/all.go. This was already on main; see above.
  • go test -race ./...: all 21 packages pass
  • python3 scripts/leak_guard.py --all: "no banned terms (8 hashed terms checked)"
  • I read the full release.yml by hand. I did not run actionlint or the workflow itself.

Non-blocking (optional, inline comments posted)

  • Line 25, patch vs minor: scheduled runs always make a patch. A new format plugin merged between scheduled runs would ship as a patch unless a maintainer runs the workflow by hand with minor first. A sentence in CONTRIBUTING → Releasing, or a skip-and-warn guard, would cover it.
  • Line 159, tag message: on schedule, github.actor is whoever last edited the cron line, so automatic tags would credit that person. Consider leaving the actor out on scheduled runs.
  • Public-repo note: GitHub turns off scheduled workflows in public repos after 60 days with no repository activity. That's unlikely here, but it would explain releases quietly stopping one day.


on:
schedule:
- cron: "0 14 * * 1,4" # Mon + Thu 14:00 UTC; scheduled runs are always a patch release

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking, but worth deciding on: scheduled runs always make a patch, while the header (line 9) says new format plugins and new exported API should be a minor. If a PR like that is merged on Tuesday and nobody runs the workflow by hand before Thursday 14:00 UTC, it ships as v0.x.(y+1). That tag can't be moved afterwards (line 18).

Two cheap ways to handle it:

  • Add a line to CONTRIBUTING → Releasing: "after merging a minor-worthy PR, run Release with minor before the next scheduled run."
  • Or have the scheduled run skip, with a ::warning::, when git diff --name-only "$latest"..HEAD touches a new plugins/*/ directory. A maintainer then cuts the minor by hand.

Comment thread .github/workflows/release.yml Outdated
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -a "$TAG" "$SHA" -m "$TAG" -m "Released by @$ACTOR with the Release workflow."
git tag -a "$TAG" "$SHA" -m "$TAG" -m "Released by the Release workflow ($EVENT_NAME, @$ACTOR)."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: on schedule events, github.actor is the user who last changed the cron line, not someone who pressed the button. Every automatic tag would read "(schedule, @adssib)", which suggests a person released it. You could drop the actor on scheduled runs, for example:

by="$EVENT_NAME"; [ "$EVENT_NAME" = "workflow_dispatch" ] && by="$EVENT_NAME, @$ACTOR"
git tag -a "$TAG" "$SHA" -m "$TAG" -m "Released by the Release workflow ($by)."

@adssib adssib mentioned this pull request Nov 19, 2026
10 of 11 tasks
…ort order

The scheduled run now skips with a warning when a new plugins/<format>/
directory appeared since the last tag (that's a minor, cut by hand), and
scheduled tags no longer credit whoever last edited the workflow.
plugins/all/all.go had catalog before apichangelog (gofmt), which failed
CI_go on main since the redis merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
@adssib
adssib merged commit 458b6f5 into main Nov 19, 2026
4 checks passed
@adssib
adssib deleted the release-schedule branch November 19, 2026 20:28
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