|
1 | 1 | --- |
2 | | -description: Prepare a new release — bumps version, updates changelog, syncs docs, waits for CI, creates GitHub Release (which triggers pub.dev publish). |
| 2 | +description: Prepare a new release — bumps version, updates changelog, syncs docs, creates GitHub Release which triggers validate + publish to pub.dev. |
3 | 3 | --- |
4 | 4 |
|
5 | 5 | ## Context |
@@ -71,39 +71,21 @@ Run all checks locally. ALL must pass before proceeding: |
71 | 71 | 4. `dart pub publish --dry-run` — must be zero warnings |
72 | 72 | 5. Review all changed files with `git diff` |
73 | 73 |
|
74 | | -If **dry-run fails** → STOP. Fix the issue before proceeding. The dry-run catches the same errors that pub.dev OIDC publish would catch. |
| 74 | +If **dry-run fails** → STOP. Fix the issue before proceeding. |
75 | 75 |
|
76 | 76 | ### Phase 6: Commit & Push |
77 | 77 |
|
78 | 78 | 1. Stage all modified files |
79 | 79 | 2. Create a single commit: `chore(release): {version}` |
80 | 80 | 3. Push to remote: `git push` |
81 | 81 |
|
82 | | -### Phase 7: Wait for CI |
| 82 | +### Phase 7: Create GitHub Release |
83 | 83 |
|
84 | | -The push triggers the **Lint & Test** workflow (`deploy.yml`) on GitHub. Wait for it to pass before creating the release. |
85 | | - |
86 | | -1. Get the run ID for the push commit: |
87 | | - ```bash |
88 | | - gh run list --branch v1 --limit 1 --json databaseId,status,conclusion --jq '.[0]' |
89 | | - ``` |
90 | | - |
91 | | -2. Wait for CI to complete: |
92 | | - ```bash |
93 | | - gh run watch {run_id} --exit-status |
94 | | - ``` |
95 | | - |
96 | | -3. Evaluate: |
97 | | - - **CI passed** → proceed to Phase 8 |
98 | | - - **CI failed** → STOP. Report the failure. Run `gh run view {run_id} --log-failed` to show the error. Do NOT create the release. The user must fix the issue and re-run `/release`. |
99 | | - |
100 | | -### Phase 8: Create GitHub Release |
101 | | - |
102 | | -CI is green. Create a GitHub Release using `gh` CLI. This does three things at once: |
| 84 | +Create a GitHub Release using `gh` CLI. This triggers the full pipeline at once: |
103 | 85 |
|
104 | 86 | 1. **Creates the GitHub Release** with changelog notes |
105 | 87 | 2. **Creates the git tag** (e.g. `1.0.0-alpha.4`) |
106 | | -3. **Triggers `publish.yml`** — the tag push activates the pub.dev OIDC publish workflow |
| 88 | +3. **Triggers `publish.yml`** — tag push starts the `validate` job (analyze + format + test), then `publish` job (dry-run + publish to pub.dev via OIDC) |
107 | 89 |
|
108 | 90 | Determine if the version is a prerelease: |
109 | 91 | - Contains `alpha` or `beta` or `rc` → add `--prerelease` flag |
@@ -153,6 +135,5 @@ Present a summary: |
153 | 135 | **Changelog:** {count} features, {count} fixes, {count} improvements |
154 | 136 |
|
155 | 137 | **Local:** ✅ Tests ({count} passed) · ✅ Analyzer (0 issues) · ✅ Format clean · ✅ Dry-run (0 warnings) |
156 | | -**CI:** ✅ Lint & Test passed (run #{run_id}) |
157 | | -**pub.dev:** ✅ Published (run #{publish_run_id}) — https://pub.dev/packages/fluttersdk_wind |
| 138 | +**pub.dev:** ✅ Validate passed → Published (run #{publish_run_id}) — https://pub.dev/packages/fluttersdk_wind |
158 | 139 | ``` |
0 commit comments