-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (35 loc) · 1.6 KB
/
android_release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 build.gradle
id: read-file
run: |
sed -i "s/\(SmileId_androidVersion=\).*/\1\"$(echo "${{ github.event.inputs.android_release_version }}" | cut -c 2-)\"/" android/gradle.properties
- name: Commit and Push Changes
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add android/gradle.properties
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 }}