mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-25 07:57:29 +01:00
FIX: use versionName
This commit is contained in:
parent
f3ef3a3ab9
commit
5e619d2d42
2 changed files with 19 additions and 5 deletions
11
.github/workflows/build-release-apk.yml
vendored
11
.github/workflows/build-release-apk.yml
vendored
|
@ -40,6 +40,13 @@ jobs:
|
|||
- name: Install node_modules
|
||||
run: npm install --production
|
||||
|
||||
- name: Extract Version Name
|
||||
id: version_name
|
||||
run: |
|
||||
VERSION_NAME=$(grep versionName android/app/build.gradle | awk '{print $2}' | tr -d '"')
|
||||
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
|
||||
echo "::set-output name=version_name::$VERSION_NAME"
|
||||
|
||||
- name: Generate Build Number based on timestamp
|
||||
run: |
|
||||
NEW_BUILD_NUMBER=$(date +%s)
|
||||
|
@ -56,5 +63,5 @@ jobs:
|
|||
- uses: actions/upload-artifact@v2
|
||||
if: success()
|
||||
with:
|
||||
name: apk
|
||||
path: ./android/app/build/outputs/apk/release/BlueWallet-6.5.0(${{ env.NEW_BUILD_NUMBER }}).apk
|
||||
name: BlueWallet-${{ env.VERSION_NAME }}(${{ env.NEW_BUILD_NUMBER }}).apk
|
||||
path: ./android/app/build/outputs/apk/release/BlueWallet-${{ env.VERSION_NAME }}(${{ env.NEW_BUILD_NUMBER }}).apk
|
||||
|
|
|
@ -13,9 +13,16 @@ rm bluewallet-release-key.keystore.hex
|
|||
cd android
|
||||
# Use the BUILD_NUMBER environment variable set in the GitHub Actions workflow
|
||||
sed -i'.original' "s/versionCode 1/versionCode $BUILD_NUMBER/g" app/build.gradle
|
||||
|
||||
# Extract versionName from build.gradle
|
||||
VERSION_NAME=$(grep versionName app/build.gradle | awk '{print $2}' | tr -d '"')
|
||||
|
||||
./gradlew assembleRelease
|
||||
# Rename the APK file to include the version and build number with parentheses
|
||||
mv ./app/build/outputs/apk/release/app-release-unsigned.apk "./app/build/outputs/apk/release/BlueWallet-6.5.0($BUILD_NUMBER).apk"
|
||||
|
||||
# Rename the APK file to include the dynamic version and build number with parentheses
|
||||
mv ./app/build/outputs/apk/release/app-release-unsigned.apk "./app/build/outputs/apk/release/BlueWallet-${VERSION_NAME}($BUILD_NUMBER).apk"
|
||||
|
||||
echo wheres waldo?
|
||||
find $ANDROID_HOME | grep apksigner | grep -v jar
|
||||
$ANDROID_HOME/build-tools/34.0.0/apksigner sign --ks ./bluewallet-release-key.keystore --ks-pass=pass:$KEYSTORE_PASSWORD "./app/build/outputs/apk/release/BlueWallet-6.5.0($BUILD_NUMBER).apk"
|
||||
|
||||
$ANDROID_HOME/build-tools/34.0.0/apksigner sign --ks ./bluewallet-release-key.keystore --ks-pass=pass:$KEYSTORE_PASSWORD "./app/build/outputs/apk/release/BlueWallet-${VERSION_NAME}($BUILD_NUMBER).apk"
|
||||
|
|
Loading…
Add table
Reference in a new issue