-
Notifications
You must be signed in to change notification settings - Fork 18
52 lines (46 loc) · 1.58 KB
/
Create-Release-PR.yml
File metadata and controls
52 lines (46 loc) · 1.58 KB
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
48
49
50
name: Framework Release
on:
workflow_dispatch:
inputs:
new_version:
description: "New sdk version"
required: true
permissions:
contents: read
jobs:
Release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
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