Skip to content

Bump to Version 1.0.1 #1

Bump to Version 1.0.1

Bump to Version 1.0.1 #1

name: Bump Audire App Version
run-name: Bump to Version ${{ github.event.inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
type: string
ios_build_number:
description: 'iOS Build Number'
required: true
type: number
android_version_code:
description: 'Android Version Code'
required: true
type: number
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Verify version
run: |
if [[ ! "${{ github.event.inputs.version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Version must be in the format of x.y.z. Received: ${{ github.event.inputs.version }}"
exit 1
fi
- name: Bump version in app.json
run: |
NEW_VERSION="${{ github.event.inputs.version }}"
sed -i 's/"version": "[^"]*"/"version": "'$NEW_VERSION'"/g' audire/audire-mobile-app/app.json
- name: Bump iOS Build Number in app.json
run: |
NEW_BUILD_NUMBER="${{ github.event.inputs.ios_build_number }}"
sed -i 's/"buildNumber": "[^"]*"/"buildNumber": "'$NEW_BUILD_NUMBER'"/g' audire/audire-mobile-app/app.json
- name: Bump Android Version Code in app.json
run: |
NEW_VERSION_CODE="${{ github.event.inputs.android_version_code }}"
sed -i 's/"versionCode": [0-9]*,/"versionCode": '$NEW_VERSION_CODE',/g' audire/audire-mobile-app/app.json
# - name: Commit and push
# run: |
# git config --local user.email "action@github.com"
# git config --local user.name "GitHub Action"
# git commit -am "chore: Bump Audire ExpoApp to v${{ github.event.inputs.version }}"
# git push