Skip to content

Commit

Permalink
Merge branch 'main' into release/1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-b authored Oct 29, 2024
2 parents 17ec981 + f70f0ef commit ebe623e
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -32,13 +33,17 @@ jobs:
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
- uses: stefanzweifel/git-auto-commit-action@v5
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
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
token: ${{ secrets.RELEASE_TOKEN }}
branch: release/v${{inputs.new_version}}
commit-message: 'Release v${{inputs.new_version}}'
title: 'Release v${{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


25 changes: 25 additions & 0 deletions .github/workflows/PR-Release-Warning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Warn Release Pull Requests
on:
pull_request:
branches:
- main
types:
- opened
jobs:
Check:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: check branch name
id: check-release
run: |
if [[ ${{ github.head_ref }} =~ ^release/(v[0-9]+\.[0-9]+\.[0-9]+$) ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- name: add comment if PR is release
if: steps.check-release.outputs.match == 'true'
uses: mshick/add-pr-comment@v2
with:
message: |
**WARNING** : This PR will trigger a release and tag when merged.
34 changes: 34 additions & 0 deletions .github/workflows/Tag-And-Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tag & Note Release
on :
pull_request:
branches:
- main
types:
- closed
jobs:
CheckRelease:
runs-on: ubuntu-latest
steps:
- name: Check if merge is release branch
id: check-release
run: |
if [[ ${{ github.head_ref }} =~ ^release/(v[0-9]+\.[0-9]+\.[0-9]+$) ]]; then
echo "match=true" >> $GITHUB_OUTPUT
echo "version=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
fi
- name: Tag if release branch
if: github.event.pull_request.merged != true || steps.check-release.outputs.match != 'true'
run: exit 1
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: version bump to ${{ steps.check-release.outputs.version }}
tagging_message: 'v${{ steps.check-release.outputs.version }}'
- uses: ncipollo/release-action@v1
with:
tag: v${{ steps.check-release.outputs.version }}
prerelease: true
generateReleaseNotes: true

0 comments on commit ebe623e

Please sign in to comment.