mirror of
https://github.com/yogeshpaliyal/KeyPass.git
synced 2026-01-05 16:36:31 -06:00
script changes (#524)
This commit is contained in:
committed by
GitHub
parent
eaf2e3a53e
commit
1c111f732b
17
.github/workflows/master-apk-create.yml
vendored
17
.github/workflows/master-apk-create.yml
vendored
@@ -25,6 +25,23 @@ jobs:
|
||||
|
||||
- name: Build APK ⚙️🛠
|
||||
run: bash ./gradlew assembleStagingDebug
|
||||
|
||||
- name: 🏗 Master Bump App Version
|
||||
id: bump-app-version
|
||||
run: |
|
||||
newVersion=$(bash ./scripts/masterVersion.sh)
|
||||
echo "::newVersion::$newVersion"
|
||||
echo "newVersion=$newVersion" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
TYPE: ${{ inputs.type }}
|
||||
RELEASE_NOTES: ${{ inputs.releaseNote }}
|
||||
|
||||
- name: Git Add and Commit
|
||||
run: |
|
||||
git config --global user.name 'Yogesh Choudhary Paliyal'
|
||||
git config --global user.email 'yogeshpaliyal@users.noreply.github.com'
|
||||
git add .
|
||||
git commit -am "Github Actions: App version Bumped to ${{ steps.bump-app-version.outputs.newVersion }}"
|
||||
|
||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||
with:
|
||||
|
||||
13
scripts/masterVersion.sh
Normal file
13
scripts/masterVersion.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Read the current versionCode and versionName from the build.gradle file
|
||||
VERSION_NAME=$(grep "versionName" app/build.gradle | awk '{print $2}' | tr -d '\r''"')
|
||||
|
||||
|
||||
NEW_VERSION_NAME="$VERSION_NAME-master"
|
||||
|
||||
# Update the build.gradle file with the new versionCode and versionName values
|
||||
sed -i "s/versionName \"$VERSION_NAME\"/versionName \"$NEW_VERSION_NAME\"/" app/build.gradle
|
||||
|
||||
# Output the new versionCode and versionName values
|
||||
echo "v$NEW_VERSION_NAME"
|
||||
Reference in New Issue
Block a user