mirror of
https://github.com/mollyim/mollyim-insider-android.git
synced 2025-05-13 05:40:53 +01:00
Build app bundles
This commit is contained in:
parent
bd6c674a12
commit
0b3450b0b1
7 changed files with 35 additions and 19 deletions
|
@ -10,5 +10,5 @@
|
|||
**/signing.properties
|
||||
**/test/androidTestEspresso/res/values/arrays.xml
|
||||
reproducible-builds/certs
|
||||
reproducible-builds/apks
|
||||
reproducible-builds/outputs
|
||||
reproducible-builds/test-reports
|
||||
|
|
20
.github/workflows/prerelease.yml
vendored
20
.github/workflows/prerelease.yml
vendored
|
@ -38,12 +38,12 @@ jobs:
|
|||
env:
|
||||
TEST_KEYSTORE: ${{ secrets.TEST_KEYSTORE }}
|
||||
|
||||
- name: Build APKs
|
||||
- name: Build pre-release
|
||||
if: "env.HAVE_TEST_KEYSTORE == 'false'"
|
||||
run: docker-compose --env-file ci/prerelease.env run assemble
|
||||
working-directory: reproducible-builds
|
||||
|
||||
- name: Build and sign APKs
|
||||
- name: Build and sign pre-release
|
||||
if: "env.HAVE_TEST_KEYSTORE == 'true'"
|
||||
run: docker-compose --env-file ci/prerelease.env run assemble
|
||||
working-directory: reproducible-builds
|
||||
|
@ -58,13 +58,21 @@ jobs:
|
|||
working-directory: reproducible-builds
|
||||
|
||||
- name: Log checksums
|
||||
run: find reproducible-builds/apks -name "*.apk" -exec sha256sum '{}' +
|
||||
run: find outputs \( -name "*.aab" -o -name "*.apk" \) -exec sha256sum '{}' +
|
||||
working-directory: reproducible-builds
|
||||
|
||||
- name: Upload APKs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
path: reproducible-builds/apks/*/release/*.apk
|
||||
name: apk
|
||||
path: reproducible-builds/outputs/apk/*/release/*.apk
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Bundles
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bundle
|
||||
path: reproducible-builds/outputs/bundle/*Release/*.aab
|
||||
if-no-files-found: error
|
||||
|
||||
publish:
|
||||
|
@ -81,6 +89,6 @@ jobs:
|
|||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Create pre-release draft
|
||||
run: gh release create -d -p -t "$GITHUB_REF_NAME Insider" "$GITHUB_REF_NAME" ./build/*/release/*.apk
|
||||
run: gh release create -d -p -t "$GITHUB_REF_NAME" "$GITHUB_REF_NAME" ./apk/*/release/*.apk
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PUBLISH_PAT || secrets.GITHUB_TOKEN }}
|
||||
|
|
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
|
@ -38,12 +38,12 @@ jobs:
|
|||
env:
|
||||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
||||
|
||||
- name: Build APKs
|
||||
- name: Build release
|
||||
if: "env.HAVE_RELEASE_KEYSTORE == 'false'"
|
||||
run: docker-compose --env-file ci/release.env run assemble
|
||||
working-directory: reproducible-builds
|
||||
|
||||
- name: Build and sign APKs
|
||||
- name: Build and sign release
|
||||
if: "env.HAVE_RELEASE_KEYSTORE == 'true'"
|
||||
run: docker-compose --env-file ci/release.env run assemble
|
||||
working-directory: reproducible-builds
|
||||
|
@ -58,13 +58,21 @@ jobs:
|
|||
working-directory: reproducible-builds
|
||||
|
||||
- name: Log checksums
|
||||
run: find reproducible-builds/apks -name "*.apk" -exec sha256sum '{}' +
|
||||
run: find outputs \( -name "*.aab" -o -name "*.apk" \) -exec sha256sum '{}' +
|
||||
working-directory: reproducible-builds
|
||||
|
||||
- name: Upload APKs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
path: reproducible-builds/apks/*/release/*.apk
|
||||
name: apk
|
||||
path: reproducible-builds/outputs/apk/*/release/*.apk
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Bundles
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bundle
|
||||
path: reproducible-builds/outputs/bundle/*Release/*.aab
|
||||
if-no-files-found: error
|
||||
|
||||
publish:
|
||||
|
@ -85,7 +93,7 @@ jobs:
|
|||
gh release list --exclude-drafts
|
||||
gh release download --pattern '*.apk' --dir latest || exit 0
|
||||
latest_apks=(latest/*.apk)
|
||||
build_apks=(build/*/release/*.apk)
|
||||
build_apks=(apk/*/release/*.apk)
|
||||
version_code() {
|
||||
local aapt=($ANDROID_HOME/build-tools/30.*/aapt)
|
||||
$aapt d badging "$1" | gawk 'match($0, /^package:.*versionCode=.([0-9]+)/, v) {print v[1]}'
|
||||
|
@ -95,6 +103,6 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create release draft
|
||||
run: gh release create -d -t "$GITHUB_REF_NAME" "$GITHUB_REF_NAME" ./build/*/release/*.apk
|
||||
run: gh release create -d -t "$GITHUB_REF_NAME" "$GITHUB_REF_NAME" ./apk/*/release/*.apk
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PUBLISH_PAT || secrets.GITHUB_TOKEN }}
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -10,5 +10,5 @@ local.properties
|
|||
signing.properties
|
||||
test/androidTestEspresso/res/values/arrays.xml
|
||||
/reproducible-builds/certs
|
||||
/reproducible-builds/apks
|
||||
/reproducible-builds/outputs
|
||||
/reproducible-builds/test-reports
|
||||
|
|
|
@ -42,10 +42,10 @@ wget https://github.com/mollyim/mollyim-android/releases/download/$VERSION/Molly
|
|||
wget https://github.com/mollyim/mollyim-android/releases/download/$VERSION/Molly-$VERSION-FOSS.apk
|
||||
|
||||
# Run the diff script to compare the APKs
|
||||
python apkdiff/apkdiff.py Molly-$VERSION.apk apks/prodGmsWebsite/release/Molly-unsigned-$VERSION.apk
|
||||
python apkdiff/apkdiff.py Molly-$VERSION.apk outputs/apk/prodGmsWebsite/release/Molly-unsigned-$VERSION.apk
|
||||
|
||||
# Run the diff script to compare the APKs (FOSS)
|
||||
python apkdiff/apkdiff.py Molly-$VERSION-FOSS.apk apks/prodFossWebsite/release/Molly-unsigned-$VERSION-FOSS.apk
|
||||
python apkdiff/apkdiff.py Molly-$VERSION-FOSS.apk outputs/apk/prodFossWebsite/release/Molly-unsigned-$VERSION-FOSS.apk
|
||||
|
||||
# Clean up the Docker environment
|
||||
docker-compose down
|
||||
|
|
|
@ -4,10 +4,10 @@ services:
|
|||
image: reproducible-molly
|
||||
build:
|
||||
context: ..
|
||||
command: :app:assembleRelease
|
||||
command: :app:assembleRelease :app:bundleRelease
|
||||
volumes:
|
||||
- ./certs:/molly/app/certs:ro
|
||||
- ./apks:/molly/app/build/outputs/apk
|
||||
- ./outputs:/molly/app/build/outputs
|
||||
environment:
|
||||
- CI_APP_TITLE
|
||||
- CI_APP_FILENAME
|
||||
|
|
Loading…
Reference in a new issue