Update version to 3.6.1 and update CHANGES.txt #82
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Tagging | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - master | |
| - development | |
| jobs: | |
| create-tag: | |
| if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') | |
| runs-on: macos-latest | |
| outputs: | |
| version: ${{ steps.extract-version.outputs.version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Git identity | |
| run: | | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "actions@github.com" | |
| - name: Extract version from branch name | |
| id: extract-version | |
| run: | | |
| BRANCH_NAME="${{ github.head_ref }}" | |
| VERSION=${BRANCH_NAME#release/} | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $VERSION" | |
| - name: Verify Version.swift contains correct version | |
| run: | | |
| VERSION_IN_FILE=$(grep -o 'private static let kVersion = "[^"]*"' Split/Common/Utils/Version.swift | cut -d'"' -f2) | |
| if [ "$VERSION_IN_FILE" != "${{ steps.extract-version.outputs.version }}" ]; then | |
| echo "❌ Error: Version in Version.swift ($VERSION_IN_FILE) does not match branch version (${{ steps.extract-version.outputs.version }})" | |
| exit 1 | |
| fi | |
| echo "✅ Version.swift contains correct version: $VERSION_IN_FILE" | |
| - name: Verify Split.podspec contains correct version | |
| run: | | |
| PODSPEC_VERSION=$(grep -o "s.version = '[^']*'" Split.podspec | cut -d"'" -f2) | |
| if [ "$PODSPEC_VERSION" != "${{ steps.extract-version.outputs.version }}" ]; then | |
| echo "❌ Error: Version in Split.podspec ($PODSPEC_VERSION) does not match branch version (${{ steps.extract-version.outputs.version }})" | |
| exit 1 | |
| fi | |
| echo "✅ Split.podspec contains correct version: $PODSPEC_VERSION" | |
| - name: Create tag | |
| run: | | |
| echo "🏷️ Creating tag ${{ steps.extract-version.outputs.version }}..." | |
| git tag -a "${{ steps.extract-version.outputs.version }}" -m "Release ${{ steps.extract-version.outputs.version }}" | |
| git push origin "${{ steps.extract-version.outputs.version }}" | |
| - name: Verify tag in remote | |
| run: | | |
| echo "✅ Verifying tag ${{ steps.extract-version.outputs.version }} exists in remote..." | |
| sleep 5 | |
| git fetch --tags | |
| if git ls-remote --tags origin | grep -q "refs/tags/${{ steps.extract-version.outputs.version }}$"; then | |
| echo "✅ Tag ${{ steps.extract-version.outputs.version }} successfully created in remote" | |
| else | |
| echo "❌ Failed to verify tag ${{ steps.extract-version.outputs.version }} in remote" | |
| exit 1 | |
| fi |