Skip to content

🏷️ Tag on PR merge #11

🏷️ Tag on PR merge

🏷️ Tag on PR merge #11

Workflow file for this run

name: "🏷️ Tag on PR merge"
on:
workflow_dispatch:
pull_request:
types: [closed]
branches:
- main
jobs:
run_on_merge:
if: github.event.pull_request.merged == true
runs-on: ubuntu-24.04
steps:
- name: "📦 Checkout"
uses: actions/checkout@v4
- name: "🔍 Find the current version"
id: find_version
run: |
RELEASE_VERSION=$(sed -n '2p' Configurations/Project-Shared.xcconfig | cut -d '=' -f2 | tr -d ' ')
echo "Found version: $RELEASE_VERSION"
echo "new_release_tag=v$RELEASE_VERSION" >> $GITHUB_OUTPUT
- name: "🚀 Create a release"
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
with:
tag_name: ${{ steps.find_version.outputs.new_release_tag }}
release_name: "Release: ${{ steps.find_version.outputs.new_release_tag }}"
body: |
Release [${{ steps.find_version.outputs.new_release_tag }}](https://${{ github.server_url }}/surpher/PactSwiftMockServerXCFramework/releases/tag/${{ steps.find_version.outputs.new_release_tag }}).
- PR: #${{ github.event.pull_request.number }}
- URL: ${{ github.event.pull_request.url }}
- Commits: ${{ github.event.pull_request.commits_url }}
- Diff: ${{ github.event.pull_request.diff_url }}
See [CHANGELOG.md][https://${{ github.server_url }}/${{ github.repository }}/blob/${{ github.event.pull_request.merge_commit_sha }}/CHANGELOG.md] for more details.
draft: false
prerelease: false