Complete release #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Complete release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
required: true | |
description: 'Release tag' | |
type: string | |
release: | |
types: [published] | |
workflow_call: | |
inputs: | |
tag: | |
required: true | |
type: string | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
complete-release: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Note: By default GitHub only fetches 1 commit. MinVer needs to find | |
# the version tag which is typically NOT on the first commit so we | |
# retrieve them all. | |
fetch-depth: 0 | |
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || inputs.tag }} | |
- name: Create GitHub Pull Request to update stable build version in props | |
if: | | |
(github.ref_type == 'tag' && startsWith(github.ref_name, 'core-') && !contains(github.ref_name, '-alpha') && !contains(github.ref_name, '-beta') && !contains(github.ref_name, '-rc')) | |
|| (inputs.tag && startsWith(inputs.tag, 'core-') && !contains(inputs.tag, '-alpha') && !contains(inputs.tag, '-beta') && !contains(inputs.tag, '-rc')) | |
shell: pwsh | |
run: | | |
Import-Module .\build\scripts\post-release.psm1 | |
CreateStableVersionUpdatePullRequest ` | |
-tag '${{ inputs.tag || github.ref_name }}' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Generate token to access opentelemetry-dotnet-contrib repository | |
id: create-opentelemetry-dotnet-contrib-token | |
env: | |
TOKEN_APP_ID_EXISTS: ${{ secrets.TOKEN_APP_ID != '' }} | |
TOKEN_APP_PRIVATE_KEY_EXISTS: ${{ secrets.TOKEN_APP_PRIVATE_KEY != '' }} | |
if: vars.CONTRIB_REPO && env.TOKEN_APP_ID_EXISTS == 'true' && env.TOKEN_APP_PRIVATE_KEY_EXISTS == 'true' | |
uses: tibdex/github-app-token@v2 | |
with: | |
app_id: ${{ secrets.TOKEN_APP_ID }} | |
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }} | |
installation_retrieval_mode: repository | |
installation_retrieval_payload: ${{ vars.CONTRIB_REPO }} | |
permissions: >- | |
{"actions": "write"} | |
repositories: >- | |
["opentelemetry-dotnet-contrib"] | |
- name: Invoke core version update workflow in opentelemetry-dotnet-contrib repository | |
shell: pwsh | |
env: | |
GH_TOKEN: ${{ steps.create-opentelemetry-dotnet-contrib-token.outputs.token }} | |
if: steps.create-opentelemetry-dotnet-contrib-token.outputs.token | |
run : | | |
Import-Module .\build\scripts\post-release.psm1 | |
InvokeCoreVersionUpdateWorkflowInRemoteRepository ` | |
-repository '${{ vars.CONTRIB_REPO }}' ` | |
-tag '${{ inputs.tag || github.ref_name }}' |