Framework Release #2
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: Framework Release | |
on: | |
workflow_dispatch: | |
inputs: | |
new_version: | |
description: "New sdk version" | |
required: true | |
jobs: | |
Release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: update version file | |
run: | | |
echo '// | |
// Copyright The OpenTelemetry Authors | |
// SPDX-License-Identifier: Apache-2.0 | |
// | |
import Foundation | |
extension Resource { | |
public static let OTEL_SWIFT_SDK_VERSION : String = "${{ inputs.new_version }}" | |
} | |
' > Sources/OpenTelemetrySdk/Version.swift | |
- name: update Podspec | |
run: | | |
sed -i -e 's/spec.version = ".*"/spec.version = "${{ inputs.new_version }}"/' OpenTelemetry-Swift-Api.podspec | |
sed -i -e 's/spec.version = ".*"/spec.version = "${{ inputs.new_version }}"/' OpenTelemetry-Swift-Sdk.podspec | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.RELEASE_TOKEN }} | |
branch: release/${{inputs.new_version}} | |
commit-message: 'Release ${{inputs.new_version}}' | |
title: 'Release ${{inputs.new_version}}' | |
delete-branch: true | |
body: > | |
This PR is auto-generated by | |
[create-pull-request](https://github.com/peter-evans/create-pull-request). | |
base: main | |