Skip to content

added pod trunk push to Tag-And-Release.yml #27

added pod trunk push to Tag-And-Release.yml

added pod trunk push to Tag-And-Release.yml #27

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/([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: '${{ steps.check-release.outputs.version }}'
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.check-release.outputs.version }}
prerelease: true
generateReleaseNotes: true
- name: push cocoapods
env:
COCOAPODS_TRUNK_TOKEN=${{ secrets.COCOAPODS_TRUNK_TOKEN }}
id: cocoapod_trunk_push
run: |
pod trunk push OpenTelemetry-Swift-Api.podspec --allow-warnings
pod trunk push OpenTelemetry-Swift-Sdk.podspec --allow-warnings --synchronous