Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added release workflow #610

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Framework Release
on:
workflow_dispatch:
inputs:
new_version:
description: "New sdk version"
required: true
jobs:
Release:
runs-on: ubuntu-latest
permissions:
contents: 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 }}"/' OpenTelemetryApi.podspec
sed -i -e 's/spec.version = ".*"/spec.version = "${{ inputs.new_version }}"/' OpenTelemetrySdk.podspec

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: version bump to ${{inputs.new_version}}
tagging_message: 'v${{ inputs.new_version }}'
- uses: ncipollo/release-action@v1
with:
tag: v${{inputs.new_version}}
prerelease: true
generateReleaseNotes: true

Loading