mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-04 04:13:49 +01:00
OPS: Updated filename for APK
This commit is contained in:
parent
01fe2dbc37
commit
9e963e4436
2 changed files with 14 additions and 9 deletions
9
.github/workflows/build-release-apk.yml
vendored
9
.github/workflows/build-release-apk.yml
vendored
|
@ -40,14 +40,21 @@ jobs:
|
||||||
- name: Install node_modules
|
- name: Install node_modules
|
||||||
run: npm install --production
|
run: npm install --production
|
||||||
|
|
||||||
|
- name: Generate Build Number based on timestamp
|
||||||
|
run: |
|
||||||
|
NEW_BUILD_NUMBER=$(date +%s)
|
||||||
|
echo "NEW_BUILD_NUMBER=$NEW_BUILD_NUMBER" >> $GITHUB_ENV
|
||||||
|
echo "::set-output name=build_number::$NEW_BUILD_NUMBER"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
KEYSTORE_FILE_HEX: ${{ secrets.KEYSTORE_FILE_HEX }}
|
KEYSTORE_FILE_HEX: ${{ secrets.KEYSTORE_FILE_HEX }}
|
||||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||||
|
BUILD_NUMBER: ${{ env.NEW_BUILD_NUMBER }}
|
||||||
run: ./scripts/build-release-apk.sh
|
run: ./scripts/build-release-apk.sh
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: apk
|
name: apk
|
||||||
path: ./android/app/build/outputs/apk/release/app-release.apk
|
path: ./android/app/build/outputs/apk/release/BlueWallet-6.5.0(${{ env.NEW_BUILD_NUMBER }}).apk
|
|
@ -1,23 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
# assumes 2 env variables: KEYSTORE_FILE_HEX & KEYSTORE_PASSWORD
|
# assumes 2 env variables: KEYSTORE_FILE_HEX & KEYSTORE_PASSWORD
|
||||||
#
|
|
||||||
# PS. to turn file to hex and back:
|
# PS. to turn file to hex and back:
|
||||||
# $ xxd -plain test.txt > test.hex
|
# $ xxd -plain test.txt > test.hex
|
||||||
# $ xxd -plain -revert test.hex test2.txt
|
# $ xxd -plain -revert test.hex test2.txt
|
||||||
|
|
||||||
|
|
||||||
echo $KEYSTORE_FILE_HEX > bluewallet-release-key.keystore.hex
|
echo $KEYSTORE_FILE_HEX > bluewallet-release-key.keystore.hex
|
||||||
xxd -plain -revert bluewallet-release-key.keystore.hex > ./android/bluewallet-release-key.keystore
|
xxd -plain -revert bluewallet-release-key.keystore.hex > ./android/bluewallet-release-key.keystore
|
||||||
rm bluewallet-release-key.keystore.hex
|
rm bluewallet-release-key.keystore.hex
|
||||||
|
|
||||||
cd android
|
cd android
|
||||||
TIMESTAMP=$(date +%s)
|
# Use the BUILD_NUMBER environment variable set in the GitHub Actions workflow
|
||||||
sed -i'.original' "s/versionCode 1/versionCode $TIMESTAMP/g" app/build.gradle
|
sed -i'.original' "s/versionCode 1/versionCode $BUILD_NUMBER/g" app/build.gradle
|
||||||
./gradlew assembleRelease
|
./gradlew assembleRelease
|
||||||
mv ./app/build/outputs/apk/release/app-release-unsigned.apk ./app/build/outputs/apk/release/app-release.apk
|
# 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
|
||||||
echo wheres waldo?
|
echo wheres waldo?
|
||||||
find $ANDROID_HOME | grep apksigner | grep -v jar
|
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/app-release.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-6.5.0($BUILD_NUMBER).apk
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue