2023-09-28 13:50:02 +02:00
|
|
|
name: Upload orangeRelease to Google Play
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-10-30 17:09:08 +01:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
2023-10-09 17:49:15 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-09-28 13:50:02 +02:00
|
|
|
|
2024-04-15 15:24:07 +02:00
|
|
|
- uses: ./.github/actions/setup-build-env
|
2023-09-28 13:50:02 +02:00
|
|
|
with:
|
2024-04-15 15:24:07 +02:00
|
|
|
gradle-cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
2023-09-28 13:50:02 +02:00
|
|
|
|
|
|
|
- name: Test
|
feat: Periodically check for updates and alert user (#236)
Users can inadvertently get stuck on older versions of the app; e.g., by
installing from one F-Droid repository that stops hosting the app at
some later time.
Analytics from the Play Store also shows a long tail of users who are,
for some reason, on an older version.
On resuming `MainActivity`, and approximately once per day, check and
see if a newer version of Pachli is available, and prompt the user to
update by going to the relevant install location (Google Play, F-Droid,
or GitHub).
The dialog prompt allows them to ignore this specific version, or
disable all future update notifications. This is also exposed through
the preferences, so the user can adjust it there too.
A different update check method is used for each installation location.
- F-Droid: Use the F-Droid API to query for the newest released version
- GitHub: Use the GitHub API to query for the newest release, and check
the APK filename attached to that release
- Google Play: Use the Play in-app-updates library
(https://developer.android.com/guide/playcore/in-app-updates) to query
for the newest released version
These are kept in different build flavours (source sets), so that e.g.,
the build for the F-Droid store can only query the F-Droid API, the UI
strings are specific to F-Droid, etc. This also ensures that the update
service libraries are specific to that build and do not
"cross-contaminate".
Note that this *does not* update the app, it takes the user to either
the relevant store page (F-Droid, Play) or GitHub release page. The user
must still start the update from that page.
CI configuration is updated to build the different flavours.
2023-11-08 08:42:39 +01:00
|
|
|
run: ./gradlew app:testOrangeGoogleReleaseUnitTest --stacktrace
|
2023-09-28 13:50:02 +02:00
|
|
|
|
|
|
|
- name: Build APK
|
feat: Periodically check for updates and alert user (#236)
Users can inadvertently get stuck on older versions of the app; e.g., by
installing from one F-Droid repository that stops hosting the app at
some later time.
Analytics from the Play Store also shows a long tail of users who are,
for some reason, on an older version.
On resuming `MainActivity`, and approximately once per day, check and
see if a newer version of Pachli is available, and prompt the user to
update by going to the relevant install location (Google Play, F-Droid,
or GitHub).
The dialog prompt allows them to ignore this specific version, or
disable all future update notifications. This is also exposed through
the preferences, so the user can adjust it there too.
A different update check method is used for each installation location.
- F-Droid: Use the F-Droid API to query for the newest released version
- GitHub: Use the GitHub API to query for the newest release, and check
the APK filename attached to that release
- Google Play: Use the Play in-app-updates library
(https://developer.android.com/guide/playcore/in-app-updates) to query
for the newest released version
These are kept in different build flavours (source sets), so that e.g.,
the build for the F-Droid store can only query the F-Droid API, the UI
strings are specific to F-Droid, etc. This also ensures that the update
service libraries are specific to that build and do not
"cross-contaminate".
Note that this *does not* update the app, it takes the user to either
the relevant store page (F-Droid, Play) or GitHub release page. The user
must still start the update from that page.
CI configuration is updated to build the different flavours.
2023-11-08 08:42:39 +01:00
|
|
|
run: ./gradlew assembleOrangeGoogleRelease --stacktrace
|
2023-09-28 13:50:02 +02:00
|
|
|
|
|
|
|
- name: Build AAB
|
feat: Periodically check for updates and alert user (#236)
Users can inadvertently get stuck on older versions of the app; e.g., by
installing from one F-Droid repository that stops hosting the app at
some later time.
Analytics from the Play Store also shows a long tail of users who are,
for some reason, on an older version.
On resuming `MainActivity`, and approximately once per day, check and
see if a newer version of Pachli is available, and prompt the user to
update by going to the relevant install location (Google Play, F-Droid,
or GitHub).
The dialog prompt allows them to ignore this specific version, or
disable all future update notifications. This is also exposed through
the preferences, so the user can adjust it there too.
A different update check method is used for each installation location.
- F-Droid: Use the F-Droid API to query for the newest released version
- GitHub: Use the GitHub API to query for the newest release, and check
the APK filename attached to that release
- Google Play: Use the Play in-app-updates library
(https://developer.android.com/guide/playcore/in-app-updates) to query
for the newest released version
These are kept in different build flavours (source sets), so that e.g.,
the build for the F-Droid store can only query the F-Droid API, the UI
strings are specific to F-Droid, etc. This also ensures that the update
service libraries are specific to that build and do not
"cross-contaminate".
Note that this *does not* update the app, it takes the user to either
the relevant store page (F-Droid, Play) or GitHub release page. The user
must still start the update from that page.
CI configuration is updated to build the different flavours.
2023-11-08 08:42:39 +01:00
|
|
|
run: ./gradlew :app:bundleOrangeGoogleRelease --stacktrace
|
2023-09-28 13:50:02 +02:00
|
|
|
|
2024-03-21 13:10:59 +01:00
|
|
|
- uses: r0adkll/sign-android-release@dbeba6b98a60b0fd540c02443c7f428cdedf0e7f # v1.0.4
|
2023-09-28 13:50:02 +02:00
|
|
|
name: Sign app APK
|
|
|
|
id: sign_app_apk
|
|
|
|
with:
|
feat: Periodically check for updates and alert user (#236)
Users can inadvertently get stuck on older versions of the app; e.g., by
installing from one F-Droid repository that stops hosting the app at
some later time.
Analytics from the Play Store also shows a long tail of users who are,
for some reason, on an older version.
On resuming `MainActivity`, and approximately once per day, check and
see if a newer version of Pachli is available, and prompt the user to
update by going to the relevant install location (Google Play, F-Droid,
or GitHub).
The dialog prompt allows them to ignore this specific version, or
disable all future update notifications. This is also exposed through
the preferences, so the user can adjust it there too.
A different update check method is used for each installation location.
- F-Droid: Use the F-Droid API to query for the newest released version
- GitHub: Use the GitHub API to query for the newest release, and check
the APK filename attached to that release
- Google Play: Use the Play in-app-updates library
(https://developer.android.com/guide/playcore/in-app-updates) to query
for the newest released version
These are kept in different build flavours (source sets), so that e.g.,
the build for the F-Droid store can only query the F-Droid API, the UI
strings are specific to F-Droid, etc. This also ensures that the update
service libraries are specific to that build and do not
"cross-contaminate".
Note that this *does not* update the app, it takes the user to either
the relevant store page (F-Droid, Play) or GitHub release page. The user
must still start the update from that page.
CI configuration is updated to build the different flavours.
2023-11-08 08:42:39 +01:00
|
|
|
releaseDirectory: app/build/outputs/apk/orangeGoogle/release
|
2023-09-28 13:50:02 +02:00
|
|
|
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
|
|
|
|
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
|
|
|
|
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
|
|
|
|
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
|
|
|
env:
|
|
|
|
BUILD_TOOLS_VERSION: "34.0.0"
|
|
|
|
|
2024-03-21 13:10:59 +01:00
|
|
|
- uses: r0adkll/sign-android-release@dbeba6b98a60b0fd540c02443c7f428cdedf0e7f # v1.0.4
|
2023-09-28 13:50:02 +02:00
|
|
|
name: Sign app AAB
|
|
|
|
id: sign_app_aab
|
|
|
|
with:
|
feat: Periodically check for updates and alert user (#236)
Users can inadvertently get stuck on older versions of the app; e.g., by
installing from one F-Droid repository that stops hosting the app at
some later time.
Analytics from the Play Store also shows a long tail of users who are,
for some reason, on an older version.
On resuming `MainActivity`, and approximately once per day, check and
see if a newer version of Pachli is available, and prompt the user to
update by going to the relevant install location (Google Play, F-Droid,
or GitHub).
The dialog prompt allows them to ignore this specific version, or
disable all future update notifications. This is also exposed through
the preferences, so the user can adjust it there too.
A different update check method is used for each installation location.
- F-Droid: Use the F-Droid API to query for the newest released version
- GitHub: Use the GitHub API to query for the newest release, and check
the APK filename attached to that release
- Google Play: Use the Play in-app-updates library
(https://developer.android.com/guide/playcore/in-app-updates) to query
for the newest released version
These are kept in different build flavours (source sets), so that e.g.,
the build for the F-Droid store can only query the F-Droid API, the UI
strings are specific to F-Droid, etc. This also ensures that the update
service libraries are specific to that build and do not
"cross-contaminate".
Note that this *does not* update the app, it takes the user to either
the relevant store page (F-Droid, Play) or GitHub release page. The user
must still start the update from that page.
CI configuration is updated to build the different flavours.
2023-11-08 08:42:39 +01:00
|
|
|
releaseDirectory: app/build/outputs/bundle/orangeGoogleRelease
|
2023-09-28 13:50:02 +02:00
|
|
|
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
|
|
|
|
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
|
|
|
|
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
|
|
|
|
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
|
|
|
env:
|
|
|
|
BUILD_TOOLS_VERSION: "34.0.0"
|
|
|
|
|
|
|
|
- name: Upload APK Release Asset
|
|
|
|
id: upload-release-asset-apk
|
2024-10-18 13:26:35 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
|
2023-09-28 13:50:02 +02:00
|
|
|
with:
|
|
|
|
name: app-release.apk
|
|
|
|
path: ${{steps.sign_app_apk.outputs.signedReleaseFile}}
|
2024-03-04 14:53:34 +01:00
|
|
|
compression-level: 0
|
2023-09-28 13:50:02 +02:00
|
|
|
|
|
|
|
- name: Generate whatsnew
|
|
|
|
id: generate-whatsnew
|
|
|
|
run: |
|
|
|
|
mkdir -p googleplay/whatsnew
|
|
|
|
git log -1 --pretty=format:"%s" > googleplay/whatsnew/whatsnew-en-US
|
|
|
|
|
|
|
|
- name: Upload AAB to Google Play
|
|
|
|
id: upload-release-asset-aab
|
2024-03-21 13:10:59 +01:00
|
|
|
uses: r0adkll/upload-google-play@935ef9c68bb393a8e6116b1575626a7f5be3a7fb # v1.1.3
|
2023-09-28 13:50:02 +02:00
|
|
|
with:
|
|
|
|
serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_KEY }}
|
|
|
|
packageName: app.pachli.current
|
|
|
|
releaseFiles: ${{steps.sign_app_aab.outputs.signedReleaseFile}}
|
2023-10-07 14:59:20 +02:00
|
|
|
track: production
|
2023-09-28 13:50:02 +02:00
|
|
|
whatsNewDirectory: googleplay/whatsnew
|
|
|
|
status: completed
|
feat: Periodically check for updates and alert user (#236)
Users can inadvertently get stuck on older versions of the app; e.g., by
installing from one F-Droid repository that stops hosting the app at
some later time.
Analytics from the Play Store also shows a long tail of users who are,
for some reason, on an older version.
On resuming `MainActivity`, and approximately once per day, check and
see if a newer version of Pachli is available, and prompt the user to
update by going to the relevant install location (Google Play, F-Droid,
or GitHub).
The dialog prompt allows them to ignore this specific version, or
disable all future update notifications. This is also exposed through
the preferences, so the user can adjust it there too.
A different update check method is used for each installation location.
- F-Droid: Use the F-Droid API to query for the newest released version
- GitHub: Use the GitHub API to query for the newest release, and check
the APK filename attached to that release
- Google Play: Use the Play in-app-updates library
(https://developer.android.com/guide/playcore/in-app-updates) to query
for the newest released version
These are kept in different build flavours (source sets), so that e.g.,
the build for the F-Droid store can only query the F-Droid API, the UI
strings are specific to F-Droid, etc. This also ensures that the update
service libraries are specific to that build and do not
"cross-contaminate".
Note that this *does not* update the app, it takes the user to either
the relevant store page (F-Droid, Play) or GitHub release page. The user
must still start the update from that page.
CI configuration is updated to build the different flavours.
2023-11-08 08:42:39 +01:00
|
|
|
mappingFile: app/build/outputs/mapping/orangeGoogleRelease/mapping.txt
|