Skip to content

Commit 6fc51c6

Browse files
[Infra] Update release process (#7034)
1 parent c724f4b commit 6fc51c6

File tree

4 files changed

+39
-39
lines changed

4 files changed

+39
-39
lines changed

.github/workflows/post-release.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ jobs:
4747
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
4848
id: otelbot-token
4949
with:
50-
app-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
50+
client-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
5151
private-key: ${{ secrets.OTELBOT_DOTNET_PRIVATE_KEY }}
52+
permission-contents: write
53+
permission-pull-requests: write
5254

5355
- name: Check out code
5456
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -101,8 +103,10 @@ jobs:
101103
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
102104
id: otelbot-token
103105
with:
104-
app-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
106+
client-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
105107
private-key: ${{ secrets.OTELBOT_DOTNET_PRIVATE_KEY }}
108+
permission-contents: write
109+
permission-pull-requests: write
106110

107111
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
108112
with:
@@ -136,20 +140,6 @@ jobs:
136140
-gitUserName ${env:BOT_USER_NAME} `
137141
-gitUserEmail ${env:BOT_USER_EMAIL}
138142
139-
- name: Invoke core version update workflow in opentelemetry-dotnet-contrib repository
140-
if: vars.CONTRIB_REPO
141-
shell: pwsh
142-
env:
143-
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
144-
CONTRIB_REPO: ${{ vars.CONTRIB_REPO }}
145-
TAG: ${{ inputs.tag || github.ref_name }}
146-
run: |
147-
Import-Module .\build\scripts\post-release.psm1
148-
149-
InvokeCoreVersionUpdateWorkflowInRemoteRepository `
150-
-remoteGitRepository ${env:CONTRIB_REPO} `
151-
-tag ${env:TAG}
152-
153143
- name: Post notice when release is published
154144
shell: pwsh
155145
env:

.github/workflows/prepare-release.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ jobs:
4343
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
4444
id: otelbot-token
4545
with:
46-
app-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
46+
client-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
4747
private-key: ${{ secrets.OTELBOT_DOTNET_PRIVATE_KEY }}
48+
permission-contents: write
49+
permission-pull-requests: write
4850

4951
- name: Check out code
5052
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -89,8 +91,10 @@ jobs:
8991
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
9092
id: otelbot-token
9193
with:
92-
app-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
94+
client-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
9395
private-key: ${{ secrets.OTELBOT_DOTNET_PRIVATE_KEY }}
96+
permission-contents: read
97+
permission-pull-requests: write
9498

9599
- name: Check out code
96100
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -130,8 +134,10 @@ jobs:
130134
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
131135
id: otelbot-token
132136
with:
133-
app-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
137+
client-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
134138
private-key: ${{ secrets.OTELBOT_DOTNET_PRIVATE_KEY }}
139+
permission-contents: write
140+
permission-pull-requests: write
135141

136142
- name: Check out code
137143
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -178,8 +184,10 @@ jobs:
178184
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
179185
id: otelbot-token
180186
with:
181-
app-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
187+
client-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
182188
private-key: ${{ secrets.OTELBOT_DOTNET_PRIVATE_KEY }}
189+
permission-contents: write
190+
permission-pull-requests: write
183191

184192
- name: Check out code
185193
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -227,8 +235,10 @@ jobs:
227235
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
228236
id: otelbot-token
229237
with:
230-
app-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
238+
client-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
231239
private-key: ${{ secrets.OTELBOT_DOTNET_PRIVATE_KEY }}
240+
permission-contents: write
241+
permission-pull-requests: write
232242

233243
- name: Check out code
234244
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/publish-packages-1.0.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,10 @@ jobs:
206206
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
207207
id: otelbot-token
208208
with:
209-
app-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
209+
client-id: ${{ vars.OTELBOT_DOTNET_APP_ID }}
210210
private-key: ${{ secrets.OTELBOT_DOTNET_PRIVATE_KEY }}
211+
permission-contents: write
212+
permission-pull-requests: write
211213

212214
- name: Check out code
213215
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

build/RELEASING.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Maintainers (admins) are needed to merge PRs and for the push to NuGet.**
5151
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/prepare-release.yml)
5252
workflow. Specify the `tag-prefix` and the `version` for the release. Make
5353
sure to run the workflow on the branch being released. This is typically
54-
`main` but could be some other branch for hotfix (eg `main-1.8.0`). The
54+
`main` but could be some other branch for hotfix (e.g. `main-1.15.0`). The
5555
workflow will open a PR to update `CHANGELOG.md` files for the projects
5656
being released. If a stable version is specified as the `version` parameter,
5757
the workflow will also merge the contents of any detected
@@ -65,16 +65,16 @@ Maintainers (admins) are needed to merge PRs and for the push to NuGet.**
6565

6666
Run the PowerShell script `.\build\scripts\update-changelogs.ps1
6767
-minVerTagPrefix [MinVerTagPrefix] -version [Version]`. Where
68-
`[MinVerTagPrefix]` is the tag prefix (eg `core-`) for the components
69-
being released and `[Version]` is the version being released (eg
70-
`1.9.0`). This will update `CHANGELOG.md` files for the projects being
68+
`[MinVerTagPrefix]` is the tag prefix (e.g. `core-`) for the components
69+
being released and `[Version]` is the version being released (e.g.
70+
`1.15.0`). This will update `CHANGELOG.md` files for the projects being
7171
released.
7272

7373
* **Stable releases only**: Normalize PublicApi files
7474

7575
Run the PowerShell script `.\build\scripts\finalize-publicapi.ps1
7676
-minVerTagPrefix [MinVerTagPrefix]`. Where `[MinVerTagPrefix]` is the tag
77-
prefix (eg `core-`) for the components being released. This will merge
77+
prefix (e.g. `core-`) for the components being released. This will merge
7878
the contents of any detected `PublicAPI.Unshipped.txt` files in the
7979
`.publicApi` folder into the corresponding `PublicAPI.Shipped.txt` files
8080
for the projects being released.
@@ -116,16 +116,16 @@ Maintainers (admins) are needed to merge PRs and for the push to NuGet.**
116116
For example:
117117

118118
```sh
119-
git tag -a core-1.4.0-beta.1 -m "1.4.0-beta.1 of all core components"
120-
git push origin core-1.4.0-beta.1
119+
git tag -a core-1.15.0 -m "core-1.15.0 of all core components"
120+
git push origin core-1.15.0
121121
```
122122

123123
* If releasing core unstable components, push the tag prefixed with
124124
`coreunstable-`. For example:
125125

126126
```sh
127-
git tag -a coreunstable-1.9.0-beta.1 -m "1.9.0-beta.1 of all core unstable components"
128-
git push origin coreunstable-1.9.0-beta.1
127+
git tag -a coreunstable-1.15.0-beta.1 -m "coreunstable-1.15.0-beta.1 of all core unstable components"
128+
git push origin coreunstable-1.15.0-beta.1
129129
```
130130

131131
Pushing the tag will kick off the [Build, pack, and publish to
@@ -204,14 +204,12 @@ Maintainers (admins) are needed to merge PRs and for the push to NuGet.**
204204
`Directory.Packages.props` to the just released stable version. Merge that
205205
PR once the build passes (this requires the packages be available on NuGet).
206206
207-
8. The [Complete
208-
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/post-release.yml)
209-
workflow should have invoked the [Core version
210-
update](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/actions/workflows/core-version-update.yml)
211-
workflow on the
212-
[opentelemetry-dotnet-contrib](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/)
213-
repository which opens a PR to update dependencies. Verify this PR was
214-
opened successfully.
207+
8. Manually run the [Core version update](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/actions/workflows/core-version-update.yml)
208+
workflow in the [opentelemetry-dotnet-contrib](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/)
209+
repository, which opens a PR to update dependencies. The tag that was created
210+
in step 5 should be used as the value of the `Release tag` input (for example
211+
`core-1.15.0` or `coreunstable-1.15.0-beta.1`). Verify this PR was opened successfully
212+
when the workflow completes.
215213
216214
9. For stable releases post an announcement in the [Slack
217215
channel](https://cloud-native.slack.com/archives/C01N3BC2W7Q) announcing the

0 commit comments

Comments
 (0)