-
Notifications
You must be signed in to change notification settings - Fork 158
49 lines (44 loc) · 1.46 KB
/
Create-Release-PR.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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