|
| 1 | +Release and Publishing Workflow |
| 2 | +=============================== |
| 3 | + |
| 4 | +This guide is for maintainers preparing a Fast Forward DevTools release. It |
| 5 | +documents the current manual release flow and the publishing surfaces affected |
| 6 | +by a merge or tag. It does not add release automation. |
| 7 | + |
| 8 | +Release Surfaces |
| 9 | +---------------- |
| 10 | + |
| 11 | +.. list-table:: |
| 12 | + :header-rows: 1 |
| 13 | + |
| 14 | + * - Surface |
| 15 | + - Purpose |
| 16 | + - Current behavior |
| 17 | + * - GitHub ``main`` |
| 18 | + - Integration branch for accepted source and documentation changes. |
| 19 | + - Pull requests merge into ``main`` after required checks pass. |
| 20 | + * - Git tags |
| 21 | + - Immutable release markers consumed by Composer and maintainers. |
| 22 | + - Created manually when maintainers decide to publish a release. |
| 23 | + * - Packagist |
| 24 | + - Composer package discovery for ``fast-forward/dev-tools``. |
| 25 | + - Reads repository tags and metadata for installable versions. |
| 26 | + * - GitHub Pages |
| 27 | + - Published reports, generated docs, and coverage pages. |
| 28 | + - Updated by the reports workflow after changes land on ``main``. |
| 29 | + * - GitHub Wiki |
| 30 | + - Markdown documentation generated by ``composer dev-tools wiki``. |
| 31 | + - Updated by the wiki workflow after changes land on ``main``. |
| 32 | + * - GitHub Releases |
| 33 | + - Human-facing release notes and changelog summary. |
| 34 | + - Created manually when a tagged version should be announced. |
| 35 | + |
| 36 | +Versioning and Branch Flow |
| 37 | +-------------------------- |
| 38 | + |
| 39 | +Use pull requests for all release-bound changes. The release candidate should |
| 40 | +land on ``main`` before any tag is created. |
| 41 | + |
| 42 | +The expected flow is: |
| 43 | + |
| 44 | +1. merge feature, bug fix, and documentation pull requests into ``main``; |
| 45 | +2. run the release verification checklist against the current ``main``; |
| 46 | +3. prepare changelog or release notes from merged work; |
| 47 | +4. create a version tag from the verified ``main`` commit; |
| 48 | +5. publish the GitHub release notes for that tag; |
| 49 | +6. confirm Packagist, reports, and wiki publication. |
| 50 | + |
| 51 | +Do not retag an existing published version. If a release needs correction, |
| 52 | +create a follow-up commit and publish a new version tag. |
| 53 | + |
| 54 | +Pre-Release Verification |
| 55 | +------------------------ |
| 56 | + |
| 57 | +Run the full project gate before tagging: |
| 58 | + |
| 59 | +.. code-block:: bash |
| 60 | +
|
| 61 | + composer install |
| 62 | + composer dev-tools |
| 63 | +
|
| 64 | +For documentation-heavy releases, also verify the generated reports and wiki |
| 65 | +commands directly: |
| 66 | + |
| 67 | +.. code-block:: bash |
| 68 | +
|
| 69 | + composer dev-tools reports |
| 70 | + composer dev-tools wiki |
| 71 | +
|
| 72 | +Before creating the tag, check the repository state: |
| 73 | + |
| 74 | +.. code-block:: bash |
| 75 | +
|
| 76 | + git status --short |
| 77 | + git log --oneline origin/main..HEAD |
| 78 | +
|
| 79 | +The working tree should be clean, and the release commit should already be on |
| 80 | +``main``. |
| 81 | + |
| 82 | +Tagging and GitHub Release Notes |
| 83 | +-------------------------------- |
| 84 | + |
| 85 | +Create the tag from the verified ``main`` commit: |
| 86 | + |
| 87 | +.. code-block:: bash |
| 88 | +
|
| 89 | + git switch main |
| 90 | + git pull --ff-only |
| 91 | + git tag <version> |
| 92 | + git push origin <version> |
| 93 | +
|
| 94 | +Use the GitHub release page for the pushed tag to publish release notes. The |
| 95 | +notes SHOULD include: |
| 96 | + |
| 97 | +- user-facing changes; |
| 98 | +- breaking changes or migration notes; |
| 99 | +- new or changed commands; |
| 100 | +- documentation and workflow changes that affect consumer repositories; |
| 101 | +- verification performed before the release. |
| 102 | + |
| 103 | +Packagist Publication |
| 104 | +--------------------- |
| 105 | + |
| 106 | +Packagist uses the Git repository metadata for |
| 107 | +`fast-forward/dev-tools <https://packagist.org/packages/fast-forward/dev-tools>`_. |
| 108 | +After pushing a tag, confirm the version appears on Packagist and that Composer |
| 109 | +can resolve it from a clean consumer project. |
| 110 | + |
| 111 | +.. code-block:: bash |
| 112 | +
|
| 113 | + composer show fast-forward/dev-tools --all |
| 114 | +
|
| 115 | +If Packagist does not show the version, inspect the package webhook or trigger a |
| 116 | +manual update from the Packagist package page. |
| 117 | + |
| 118 | +Reports and Wiki Publication |
| 119 | +---------------------------- |
| 120 | + |
| 121 | +Reports and wiki publication are tied to ``main`` workflows, not to the tag |
| 122 | +itself: |
| 123 | + |
| 124 | +- the reports workflow publishes generated reports to GitHub Pages after |
| 125 | + changes land on ``main``; |
| 126 | +- the wiki workflow promotes generated wiki content after changes land on |
| 127 | + ``main``; |
| 128 | +- pull request previews remain review artifacts and should not be treated as |
| 129 | + final release output. |
| 130 | + |
| 131 | +When a release contains documentation changes, validate the final Pages and wiki |
| 132 | +output after the merge to ``main`` and before announcing the release broadly. |
| 133 | + |
| 134 | +Post-Release Validation |
| 135 | +----------------------- |
| 136 | + |
| 137 | +After the tag and release notes are published: |
| 138 | + |
| 139 | +1. confirm the tag exists on GitHub; |
| 140 | +2. confirm the version appears on Packagist; |
| 141 | +3. install the tagged version in a temporary consumer project; |
| 142 | +4. verify GitHub Pages reports reflect the release commit; |
| 143 | +5. verify the GitHub Wiki reflects the release commit; |
| 144 | +6. check that no release pull request preview artifacts are left active by |
| 145 | + mistake; |
| 146 | +7. open follow-up issues for any release automation or changelog improvements |
| 147 | + discovered during the process. |
| 148 | + |
| 149 | +Current Manual Steps Versus Future Automation |
| 150 | +--------------------------------------------- |
| 151 | + |
| 152 | +Maintainers currently choose the release commit, create the tag, and write |
| 153 | +release notes manually. That keeps release intent explicit. |
| 154 | + |
| 155 | +Future automation could help generate changelog drafts, validate Packagist |
| 156 | +publication, or summarize post-release checks. Those improvements should remain |
| 157 | +separate from this guide unless the release process itself changes. |
0 commit comments