Skip to content

Automate per-branch releases (dev prereleases, main stable) - #5

Merged
imedboumalek merged 1 commit into
devfrom
feat/auto-release
Jul 23, 2026
Merged

Automate per-branch releases (dev prereleases, main stable)#5
imedboumalek merged 1 commit into
devfrom
feat/auto-release

Conversation

@imedboumalek

@imedboumalek imedboumalek commented Jul 13, 2026

Copy link
Copy Markdown
Owner

What

Replaces dev-release.yaml with auto-release.yaml, which runs on every push to dev and main and handles tag + publish automatically.

Push to Publishes Version
dev prerelease pubspec X.Y.ZX.Y.Z-dev.N (N = highest existing dev tag + 1, auto)
main stable pubspec version verbatim (keeps +build)
  • The pubspec holds the target X.Y.Z; -dev.N is never hand-edited. Since pub.dev publishes the pubspec version at the tag and requires tag == v<version>, the dev path synthesizes a release commit setting version: X.Y.Z-dev.N and tags that (tag-only push; dev branch untouched → no trigger loop).
  • main is guarded: if vX.Y.Z already exists it's a no-op, so only a version bump releases.
  • Publish still runs via publish.yaml, dispatched on the new tag ref.

Rollout (expected, agreed)

  • First merge to dev publishes a stray 0.4.0-dev.1 (pubspec base is 0.4.0) — harmless, sorts below 0.4.0, retractable.
  • First merge to main auto-publishes 0.4.0+1 (the README banner release), since that tag doesn't exist yet. This is how the banner reaches pub.dev.

Notes

  • The dev path tags a non-branch (synthetic) commit; pub.dev OIDC verifies tag ref + repo, not branch-reachability, so this is expected to work — the first real dev prerelease confirms it.
  • No CHANGELOG entry per -dev.N (minor pana hit, accepted for the dev channel).

@imedboumalek
imedboumalek merged commit 3eb5a5c into dev Jul 23, 2026
3 checks passed
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