Skip to content

Update iOS Version

Update iOS Version #33

Workflow file for this run

name: Update iOS Version
on:
workflow_dispatch:
inputs:
ios_release_version:
description: 'SmileID iOS Version'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
update-ios:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Create Release Branch
run: |
git checkout -b "ios-${{ github.event.inputs.ios_release_version }}"
git push origin "ios-${{ github.event.inputs.ios_release_version }}"
- name: Read version
id: read-file
run: |
sed -i "s/s.version\s*=\s*'[^']*'/s.version = '$(echo "${{ github.event.inputs.ios_release_version }}" | cut -c 2-)'/g" ios/smile_id.podspec
sed -i "s/s.dependency\s*'SmileID'\s*,\s*'[^']*'/s.dependency 'SmileID', '$(echo "${{ github.event.inputs.ios_release_version }}" | cut -c 2-)'/g" ios/smile_id.podspec
cd example/ios
pod update smile_id SmileID
- name: Commit and Push Changes
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add ios/smile_id.podspec
git add example/ios/Podfile.lock
git commit -m "Update iOS SDK version to ${{ github.event.inputs.ios_release_version }}"
git push --set-upstream origin "ios-${{ github.event.inputs.ios_release_version }}"
- name: Create Pull Request
run: |
gh pr create --title "Merge release "ios-${{ github.event.inputs.ios_release_version }}" into main" --body "This is an automated pull request to update the version." --base main --head "ios-${{ github.event.inputs.ios_release_version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}