Skip to content

Update Android Version #37

Update Android Version

Update Android Version #37

name: Update Android Version
on:
workflow_dispatch:
inputs:
android_release_version:
description: 'SmileID Android Version'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
update-android:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Create Release Branch
run: |
git checkout -b "android-${{ github.event.inputs.android_release_version }}"
git push origin "android-${{ github.event.inputs.android_release_version }}"
- name: Read version
id: read-file
run: |
sed -i "s/\(def smileVersion = findProperty('smileVersion') ?: \).*/\1'$(echo "${{ github.event.inputs.android_release_version }}" | cut -c 2-)'/" android/build.gradle
- name: Commit and Push Changes
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add android/build.gradle
git commit -m "Update Android SDK version to ${{ github.event.inputs.android_release_version }}"
git push --set-upstream origin "android-${{ github.event.inputs.android_release_version }}"
- name: Create Pull Request
run: |
gh pr create --title "Merge release "android-${{ github.event.inputs.android_release_version }}" into main" --body "This is an automated pull request to update the version." --base main --head "android-${{ github.event.inputs.android_release_version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}