Skip to content

Commit 3eecc26

Browse files
committed
Add documentation on which actions are used
1 parent f122e74 commit 3eecc26

1 file changed

Lines changed: 112 additions & 3 deletions

File tree

docs/release-automation.md

Lines changed: 112 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ the seams are.
1717
- [The OSS release, end to end](#the-oss-release-end-to-end)
1818
- [The commercial release, and how it differs](#the-commercial-release-and-how-it-differs)
1919
- [Hotfixes](#hotfixes)
20+
- [Which actions each workflow uses](#which-actions-each-workflow-uses)
2021
- [Everything else this repo runs](#everything-else-this-repo-runs)
2122
- [This repository's own versioning](#this-repositorys-own-versioning)
2223
- [Conventions](#conventions)
@@ -341,9 +342,9 @@ uses. They do not interfere.
341342
4. **`new-milestones`** — open the next milestone per project
342343
5. **`merge-back-and-update`** — merge the commercial `release/<version>` back into the OSS `.x`
343344
branch, bump to next-snapshot versions, push, comment `@dependabot recreate` on superseded PRs
344-
6. **`milestones-and-releases`** — close the release milestone
345-
([`close-milestone`](../.github/actions/close-milestone/), which moves any still-open issues
346-
forward so they are not stranded), publish the GitHub Release with generated notes
345+
6. **`milestones-and-releases`** — close the release milestone (inline, via a `gh api ... --method
346+
PATCH --field state=closed` call rather than the `close-milestone` action) and publish the
347+
GitHub Release with generated notes
347348
7. **`website-pr`** — PR against `spring-io/spring-website-content`: blog post and
348349
`documentation.json`
349350
8. **`start-site-pr`** — PR against `spring-io/start.spring.io` bumping the Initializr's Spring
@@ -659,6 +660,114 @@ would make it skip along with the merge-back, leaving a hotfix run doing nothing
659660

660661
---
661662

663+
## Which actions each workflow uses
664+
665+
The release workflows are thin: almost everything they do is a composite action from
666+
[`.github/actions/`](../.github/actions/). This is the map of which workflow calls what, and why.
667+
668+
### `create-oss-release-branch.yml`
669+
670+
| Job | Action | What it does here |
671+
|---|---|---|
672+
| `init-internal-branch` | [`add-commercial-release-files`](../.github/actions/add-commercial-release-files/) | Writes `ci-release.yml` and `release-ci-settings.xml` onto the `-internal` branch |
673+
| `init-internal-branch` | [`update-projects-json`](../.github/actions/update-projects-json/) | Registers the `-internal` branch, with `remove-oss-branch: false` |
674+
| `init-internal-branch` | [`update-project-versions`](../.github/actions/update-project-versions/) | Stamps `-INTERNAL-SNAPSHOT` from the train's internal properties file |
675+
| `update-release-branch` | [`add-commercial-release-files`](../.github/actions/add-commercial-release-files/) | Re-targets `ci-release.yml` at `release/<version>` |
676+
| `create-milestone` | [`create-milestone`](../.github/actions/create-milestone/) | Opens the milestone — in the **OSS** repo |
677+
| `ensure-workflows` | [`check-release-train-workflows`](../.github/actions/check-release-train-workflows/) | Reports which release-train workflows are missing |
678+
| `ensure-workflows` | [`generate-workflows-for-branch`](../.github/actions/generate-workflows-for-branch/) | Runs the external generator when any are |
679+
680+
### `create-commercial-release-branch.yml`
681+
682+
| Job | Action | What it does here |
683+
|---|---|---|
684+
| `join-release-train` | [`is-commercial-repo`](../.github/actions/is-commercial-repo/) | Gates the whole run, and yields `base-repo-name` for the OSS tag check |
685+
| `join-release-train` | [`check-release-train-workflows`](../.github/actions/check-release-train-workflows/) | `fail-on-missing: 'true'`, before anything is created |
686+
| `join-release-train` | [`create-milestone`](../.github/actions/create-milestone/) | Opens the milestone — in the **commercial** repo |
687+
| `join-release-train` | [`update-oss-workflows-to-commercial`](../.github/actions/update-oss-workflows-to-commercial/) | Rewrites `ci.yml` / `pr.yml` on the release branch |
688+
| `join-release-train` | [`update-projects-json`](../.github/actions/update-projects-json/) | Registers `release/<version>` |
689+
690+
Note what is absent: no `update-project-versions`. This path stamps nothing — versions stay as
691+
they are until readiness.
692+
693+
### `create-hotfix-release-branch.yml`
694+
695+
| Job | Action | What it does here |
696+
|---|---|---|
697+
| `initialize` | *calls* [`initialize-commercial-branch.yml`](../.github/workflows/initialize-commercial-branch.yml) | The whole commercial-setup chain — see below |
698+
| `update-versions` | [`update-project-versions`](../.github/actions/update-project-versions/) | First pass: dependency versions from a release train, when `release_train_version` is given |
699+
| `update-versions` | [`update-project-versions`](../.github/actions/update-project-versions/) | Second pass: stamps the hotfix project version, always |
700+
| `create-milestone` | [`create-milestone`](../.github/actions/create-milestone/) | Opens the milestone — in the **commercial** repo |
701+
| `ensure-workflows` | [`check-release-train-workflows`](../.github/actions/check-release-train-workflows/) | Reports which release-train workflows are missing |
702+
| `ensure-workflows` | [`generate-workflows-for-branch`](../.github/actions/generate-workflows-for-branch/) | Runs the external generator when any are |
703+
704+
The `initialize` job pulls in a second workflow, which runs nine actions of its own in order —
705+
[`create-commercial-branch`](../.github/actions/create-commercial-branch/) (orphan branch),
706+
[`copy-settings-xml`](../.github/actions/copy-settings-xml/),
707+
[`update-oss-workflows-to-commercial`](../.github/actions/update-oss-workflows-to-commercial/),
708+
[`update-license-headers`](../.github/actions/update-license-headers/),
709+
[`update-commercial-repositories`](../.github/actions/update-commercial-repositories/),
710+
[`update-distribution-management`](../.github/actions/update-distribution-management/),
711+
[`update-antora-playbook`](../.github/actions/update-antora-playbook/),
712+
[`copy-dependabot-config`](../.github/actions/copy-dependabot-config/) and
713+
[`update-projects-json`](../.github/actions/update-projects-json/). That chain is why a hotfix branch arrives
714+
fully converted to commercial form despite being cut from an OSS tag.
715+
716+
### `release-train-ready.yml`
717+
718+
One action does everything:
719+
[`spring-release-train-project-ready`](../.github/actions/spring-release-train-project-ready/), which is itself a
720+
composite calling three more — [`update-project-versions`](../.github/actions/update-project-versions/) to stamp
721+
the final numbers, [`verify-no-snapshot-versions`](../.github/actions/verify-no-snapshot-versions/) as the gate,
722+
and [`update-antora-playbook`](../.github/actions/update-antora-playbook/) to drop the release branch from the
723+
playbook.
724+
725+
### `post-release.yml`
726+
727+
| Job | Action | What it does here |
728+
|---|---|---|
729+
| `new-milestones` | [`create-milestone`](../.github/actions/create-milestone/) | Opens the next snapshot version's milestone |
730+
| `merge-back-and-update` | [`update-project-versions`](../.github/actions/update-project-versions/) | Bumps `.x` to the next snapshots after the merge |
731+
732+
Everything else in `post-release` — tag verification, closing milestones, publishing releases,
733+
the website and start.spring.io PRs, the project board — is inline `gh` and `github-script`, not
734+
composite actions. Note in particular that it closes milestones with a direct
735+
`gh api ... --method PATCH --field state=closed`; the
736+
[`close-milestone`](../.github/actions/close-milestone/) action, which migrates still-open issues forward, is
737+
used only by this repository's own release workflow.
738+
739+
### Supporting release workflows
740+
741+
| Workflow | Job | Actions |
742+
|---|---|---|
743+
| [`setup-next-release-train.yml`](../.github/workflows/README-setup-next-release-train.md) | `prepare` | [`retarget-branch-triggers`](../.github/actions/retarget-branch-triggers/), [`add-dependabot-branch-entries`](../.github/actions/add-dependabot-branch-entries/), [`update-project-versions`](../.github/actions/update-project-versions/), [`create-milestone`](../.github/actions/create-milestone/) |
744+
| | `register-branches` | [`add-branches-projects-json`](../.github/actions/add-branches-projects-json/) |
745+
| [`update-versions.yml`](../.github/workflows/README-update-versions.md) | `update` | [`update-project-versions`](../.github/actions/update-project-versions/) |
746+
| [`lock-unlock-branches.yml`](../.github/workflows/README-lock-branches.md) || None — pure `gh api` ruleset calls |
747+
748+
### The load-bearing few
749+
750+
Two actions carry most of the release:
751+
752+
- **[`update-project-versions`](../.github/actions/update-project-versions/)** is called directly by five
753+
workflows — `create-oss-release-branch`, `create-hotfix-release-branch` (twice),
754+
`setup-next-release-train`, `update-versions` and `post-release` — and a sixth time indirectly,
755+
inside `spring-release-train-project-ready`. Every version this automation writes goes through
756+
it.
757+
- **[`create-milestone`](../.github/actions/create-milestone/)** is called by all five release-path workflows
758+
(plus this repo's own release workflow), and is the one action whose *target repository*
759+
differs by release type: the OSS repo for an OSS release, the commercial repo for a commercial
760+
release or a hotfix.
761+
762+
Two more are worth knowing because they are shared in a way that is easy to miss:
763+
[`add-commercial-release-files`](../.github/actions/add-commercial-release-files/) internally calls
764+
[`resolve-actions-ref`](../.github/actions/resolve-actions-ref/) so the `ci-release.yml` it writes is pinned to a
765+
released SHA rather than `main`, and
766+
[`check-release-train-workflows`](../.github/actions/check-release-train-workflows/) is the single definition of
767+
which release-train workflow files a branch needs, shared by all three branch-creation paths.
768+
769+
---
770+
662771
## Everything else this repo runs
663772

664773
### Daily builds

0 commit comments

Comments
 (0)