Skip to content

Update name for sanitycheck job #5829

Update name for sanitycheck job

Update name for sanitycheck job #5829

name: Prepare for a release
on:
workflow_dispatch:
inputs:
component:
type: choice
options:
- OpenTelemetry.Exporter.Geneva
- OpenTelemetry.Exporter.InfluxDB
- OpenTelemetry.Exporter.Instana
- OpenTelemetry.Exporter.OneCollector
- OpenTelemetry.Extensions
- OpenTelemetry.Extensions.AWS
- OpenTelemetry.Extensions.Enrichment
- OpenTelemetry.Extensions.Enrichment.AspNetCore
- OpenTelemetry.Extensions.Enrichment.Http
- OpenTelemetry.Instrumentation.AspNet
- OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule
- OpenTelemetry.Instrumentation.AspNetCore
- OpenTelemetry.Instrumentation.AWS
- OpenTelemetry.Instrumentation.AWSLambda
- OpenTelemetry.Instrumentation.Cassandra
- OpenTelemetry.Instrumentation.ConfluentKafka
- OpenTelemetry.Instrumentation.ElasticsearchClient
- OpenTelemetry.Instrumentation.EntityFrameworkCore
- OpenTelemetry.Instrumentation.EventCounters
- OpenTelemetry.Instrumentation.GrpcCore
- OpenTelemetry.Instrumentation.GrpcNetClient
- OpenTelemetry.Instrumentation.Hangfire
- OpenTelemetry.Instrumentation.Http
- OpenTelemetry.Instrumentation.MassTransit
- OpenTelemetry.Instrumentation.MySqlData
- OpenTelemetry.Instrumentation.Owin
- OpenTelemetry.Instrumentation.Process
- OpenTelemetry.Instrumentation.Quartz
- OpenTelemetry.Instrumentation.Runtime
- OpenTelemetry.Instrumentation.ServiceFabricRemoting
- OpenTelemetry.Instrumentation.SqlClient
- OpenTelemetry.Instrumentation.StackExchangeRedis
- OpenTelemetry.Instrumentation.Wcf
- OpenTelemetry.OpAmp.Client
- OpenTelemetry.PersistentStorage.Abstractions
- OpenTelemetry.PersistentStorage.FileSystem
- OpenTelemetry.Resources.AWS
- OpenTelemetry.Resources.Azure
- OpenTelemetry.Resources.Container
- OpenTelemetry.Resources.Gcp
- OpenTelemetry.Resources.Host
- OpenTelemetry.Resources.OperatingSystem
- OpenTelemetry.Resources.Process
- OpenTelemetry.Resources.ProcessRuntime
- OpenTelemetry.Sampler.AWS
- OpenTelemetry.SemanticConventions
description: 'Release component'
required: true
version:
type: string
description: 'Release version'
required: true
releaseIssue:
type: string
description: 'Release request issue'
required: false
pull_request:
types:
- closed
issues:
types:
- opened
- edited
issue_comment:
types:
- created
permissions:
contents: read
jobs:
automation:
uses: ./.github/workflows/automation.yml
secrets:
OTELBOT_DOTNET_CONTRIB_PRIVATE_KEY: ${{ secrets.OTELBOT_DOTNET_CONTRIB_PRIVATE_KEY }}
prepare-release-pr:
runs-on: ubuntu-24.04
needs: automation
if: github.event_name == 'workflow_dispatch' && needs.automation.outputs.enabled
steps:
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_DOTNET_CONTRIB_APP_ID }}
private-key: ${{ secrets.OTELBOT_DOTNET_CONTRIB_PRIVATE_KEY }}
- name: Check out code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
token: ${{ steps.otelbot-token.outputs.token }}
- name: Create GitHub Pull Request to prepare release
shell: pwsh
env:
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
BOT_USER_EMAIL: ${{ needs.automation.outputs.email }}
BOT_USER_NAME: ${{ needs.automation.outputs.username }}
COMMENT_USER_NAME: ${{ github.event.sender.login }}
COMPONENT: ${{ inputs.component }}
RELEASE_ISSUE: ${{ inputs.releaseIssue }}
VERSION: ${{ inputs.version }}
run: |
Import-Module .\build\scripts\prepare-release.psm1
CreatePullRequestToUpdateChangelogsAndPublicApis `
-gitRepository ${env:GITHUB_REPOSITORY} `
-component ${env:COMPONENT} `
-version ${env:VERSION} `
-requestedByUserName ${env:COMMENT_USER_NAME} `
-releaseIssue ${env:RELEASE_ISSUE} `
-targetBranch ${env:GITHUB_REF_NAME} `
-gitUserName ${env:BOT_USER_NAME} `
-gitUserEmail ${env:BOT_USER_EMAIL}
lock-pr-and-post-notice-to-create-release-tag:
runs-on: ubuntu-24.04
needs: automation
if: |
github.event_name == 'pull_request' &&
github.event.action == 'closed' &&
github.event.pull_request.user.login == needs.automation.outputs.application-username &&
github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.title, '[release] Prepare release ') &&
needs.automation.outputs.enabled
steps:
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_DOTNET_CONTRIB_APP_ID }}
private-key: ${{ secrets.OTELBOT_DOTNET_CONTRIB_PRIVATE_KEY }}
- name: Check out code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
token: ${{ steps.otelbot-token.outputs.token }}
- name: Lock GitHub Pull Request to prepare release
shell: pwsh
env:
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
EXPECTED_PR_AUTHOR_USER_NAME: ${{ needs.automation.outputs.application-name }}
ISSUE_NUMBER: ${{ github.event.pull_request.number }}
run: |
Import-Module .\build\scripts\prepare-release.psm1
LockPullRequestAndPostNoticeToCreateReleaseTag `
-gitRepository ${env:GITHUB_REPOSITORY} `
-pullRequestNumber ${env:ISSUE_NUMBER} `
-expectedPrAuthorUserName ${env:EXPECTED_PR_AUTHOR_USER_NAME}
create-release-tag-unlock-pr-post-notice:
runs-on: ubuntu-24.04
needs: automation
if: |
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.issue.locked == true &&
github.event.comment.user.login != needs.automation.outputs.application-username &&
contains(github.event.comment.body, '/CreateReleaseTag') &&
startsWith(github.event.issue.title, '[release] Prepare release ') &&
github.event.issue.pull_request.merged_at &&
needs.automation.outputs.enabled
steps:
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_DOTNET_CONTRIB_APP_ID }}
private-key: ${{ secrets.OTELBOT_DOTNET_CONTRIB_PRIVATE_KEY }}
- name: Check out code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
fetch-depth: 0
token: ${{ steps.otelbot-token.outputs.token }}
- name: Create release tag
id: create-tag
shell: pwsh
env:
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
BOT_USER_EMAIL: ${{ needs.automation.outputs.email }}
BOT_USER_NAME: ${{ needs.automation.outputs.username }}
EXPECTED_PR_AUTHOR_USER_NAME: ${{ needs.automation.outputs.application-name }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
Import-Module .\build\scripts\prepare-release.psm1
CreateReleaseTagAndPostNoticeOnPullRequest `
-gitRepository ${env:GITHUB_REPOSITORY} `
-pullRequestNumber ${env:ISSUE_NUMBER} `
-expectedPrAuthorUserName ${env:EXPECTED_PR_AUTHOR_USER_NAME} `
-gitUserName ${env:BOT_USER_NAME} `
-gitUserEmail ${env:BOT_USER_EMAIL}
update-changelog-release-dates-on-prepare-pr-post-notice:
runs-on: ubuntu-24.04
needs: automation
if: |
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.issue.state == 'open' &&
github.event.comment.user.login != needs.automation.outputs.application-username &&
contains(github.event.comment.body, '/UpdateReleaseDates') &&
startsWith(github.event.issue.title, '[release] Prepare release ') &&
github.event.issue.pull_request.merged_at == null &&
needs.automation.outputs.enabled
steps:
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_DOTNET_CONTRIB_APP_ID }}
private-key: ${{ secrets.OTELBOT_DOTNET_CONTRIB_PRIVATE_KEY }}
- name: Check out code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
fetch-depth: 0
token: ${{ steps.otelbot-token.outputs.token }}
- name: Update release date
id: create-tag
shell: pwsh
env:
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
BOT_USER_EMAIL: ${{ needs.automation.outputs.email }}
BOT_USER_NAME: ${{ needs.automation.outputs.username }}
EXPECTED_PR_AUTHOR_USER_NAME: ${{ needs.automation.outputs.application-name }}
COMMENT_USER_NAME: ${{ github.event.comment.user.login }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
Import-Module .\build\scripts\prepare-release.psm1
UpdateChangelogReleaseDatesAndPostNoticeOnPullRequest `
-gitRepository ${env:GITHUB_REPOSITORY} `
-pullRequestNumber ${env:ISSUE_NUMBER} `
-expectedPrAuthorUserName ${env:EXPECTED_PR_AUTHOR_USER_NAME} `
-commentUserName ${env:COMMENT_USER_NAME} `
-gitUserName ${env:BOT_USER_NAME} `
-gitUserEmail ${env:BOT_USER_EMAIL}
process-release-request-issue:
runs-on: ubuntu-24.04
needs: automation
if: |
startsWith(github.event.issue.title, '[release request] ') &&
github.event.issue.pull_request == null &&
needs.automation.outputs.enabled &&
(
(github.event_name == 'issues')
||
(github.event_name == 'issue_comment' &&
github.event.issue.state == 'open' &&
contains(github.event.comment.body, '/PrepareRelease') &&
github.event.comment.user.login != needs.automation.outputs.application-username)
)
steps:
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_DOTNET_CONTRIB_APP_ID }}
private-key: ${{ secrets.OTELBOT_DOTNET_CONTRIB_PRIVATE_KEY }}
- name: Check out code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
token: ${{ steps.otelbot-token.outputs.token }}
- name: Process release request issue being opened or commented
shell: pwsh
env:
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
BOT_USER_EMAIL: ${{ needs.automation.outputs.email }}
BOT_USER_NAME: ${{ needs.automation.outputs.username }}
ISSUE_BODY: ${{ github.event.issue.body }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
REQUESTOR_USER_NAME: ${{ github.event.comment.user.login || github.event.sender.login }}
TARGET_BRANCH: ${{ github.event.repository.default_branch }}
run: |
Import-Module .\build\scripts\prepare-release.psm1
TagCodeOwnersOnOrRunWorkflowForRequestReleaseIssue `
-gitRepository ${env:GITHUB_REPOSITORY} `
-targetBranch ${env:TARGET_BRANCH} `
-triggeringEventName ${env:GITHUB_EVENT_NAME} `
-approvingGroups "@${env:GITHUB_REPOSITORY_OWNER}/dotnet-approvers @${env:GITHUB_REPOSITORY_OWNER}/dotnet-maintainers" `
-requestedByUserName ${env:REQUESTOR_USER_NAME} `
-issueNumber ${env:ISSUE_NUMBER} `
-issueBody ${env:ISSUE_BODY} `
-gitUserName ${env:BOT_USER_NAME} `
-gitUserEmail ${env:BOT_USER_EMAIL}