Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,11 @@ jobs:
MONOREPO: open-telemetry/${{ matrix.monorepo }}
SENDER: ${{ github.event.sender.login }}
run: |
args=("--repository=$MONOREPO")
# Each monorepo's gitsplit workflow tags the release once it merges
args=("--repository=$MONOREPO" --tags-on-merge)
if [ "$GITHUB_EVENT_NAME" = pull_request ]; then
args+=(--rebuild-only)
fi
# Core's gitsplit workflow tags the release once it merges. Contrib's doesn't yet.
if [ "$MONOREPO" = open-telemetry/opentelemetry-php ]; then
args+=(--tags-on-merge)
fi
# Dispatch already needs write access
if [ "$GITHUB_EVENT_NAME" != workflow_dispatch ]; then
args+=("--sender=$SENDER")
Expand Down
26 changes: 14 additions & 12 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,16 @@ entries, and the Release approval check fails on it.
Merge the release pull request once it is approved and its checks pass. gitsplit then pushes each
package to its split repository.

In core, two more jobs in the same
[gitsplit](https://github.com/open-telemetry/opentelemetry-php/actions/workflows/split-monorepo.yaml)
run then tag the release:
Two more jobs in the same gitsplit run then tag the release. The run is in the monorepo the release
is for: [core](https://github.com/open-telemetry/opentelemetry-php/actions/workflows/split-monorepo.yaml)
or [contrib](https://github.com/open-telemetry/opentelemetry-php-contrib/actions/workflows/split_monorepo.yaml).

1. Plan the release runs `release:run --dry-run` on the merge commit, and comments on the pull
request with the versions it would tag.
2. Tag the release waits for approval. Check the comment, open the run from its link, and approve
the job under Review deployments. It runs `release:run`, comments with a link to each release,
and refreshes the dashboard.
the job under Review deployments. It runs `release:run` and comments with a link to each
release. In core it also refreshes the dashboard. Contrib's job can't reach this repository, so
tick Refresh now on contrib's dashboard, or wait for the daily rewrite.

If the dry run finds a problem, such as a split that gitsplit hasn't pushed, the comment lists it and
nothing is tagged. Fix it, then [tag by hand](#tag-by-hand).
Expand All @@ -174,7 +175,7 @@ including any tagged by hand since the comment.

### Tag by hand

Contrib isn't tagged on merge yet, and core may need tagging by hand if the job can't run. Run
If the tag job can't run, tag by hand. Run
[release:run](https://github.com/opentelemetry-php/dev-tools#tag-a-release) from a full checkout of
the monorepo at the release's merge commit. It needs a token that can create releases in the
opentelemetry-php organization, which only its administrators have. See
Expand Down Expand Up @@ -206,7 +207,7 @@ follow
| `release-dashboard.yml` | Rewrites the dashboard issues |
| `release-pr.yml` | Opens and rebuilds the release pull requests, and adds the note when `main` moves |
| `release-approval.yml` | The Release approval check on core's release pull request |
| `split-monorepo.yaml` | Pushes each package to its split repository, and tags core's releases |
| `split-monorepo.yaml`, and `split_monorepo.yaml` in contrib | Pushes each package to its split repository, and tags the monorepo's releases |

The dashboard workflow fails unless exactly one open issue has the dashboard's label. To replace
one that was closed or deleted, open an issue titled `Release dashboard: core` or
Expand All @@ -221,15 +222,16 @@ The Release approval check blocks a merge only once it is a required status chec
repository administrator sets. It is skipped on other pull requests, which counts as passing.
Contrib has no copy of the check yet, as a workflow here can't see contrib's pull requests.

The tag job runs in the `release` environment. A repository administrator creates it under
Settings, Environments, with:
The tag job runs in the monorepo's `release` environment. A repository administrator creates it
under Settings, Environments, with:

- Required reviewers: the maintainers who may approve a tag. Leave Prevent self-review off, so the
maintainer who merged can approve.
- Deployment branches and tags: `main` only.
- The `OPENTELEMETRY_PHP_CLIENT_ID` variable and `OPENTELEMETRY_PHP_PRIVATE_KEY` secret of the
`opentelemetry-php` GitHub App, which an administrator of the opentelemetry-php organization can
create a key for.
- In core, the `OPENTELEMETRY_PHP_CLIENT_ID` variable and `OPENTELEMETRY_PHP_PRIVATE_KEY` secret of
the `opentelemetry-php` GitHub App, which an administrator of the opentelemetry-php organization
can create a key for. Contrib has them as repository settings already, for gitsplit, and the tag
job reads those.

The tag job waits for approval only while the environment has required reviewers. So the plan job
checks for them first, and without them it fails and tags nothing.
Expand Down
Loading