-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add internal testing pipeline that runs for `-qa` and `-rc` tags. It builds signed APKs for 3 networks and publishes them for internal testing in Firebase; - Add release build pipeline that runs for `X.Y.Z` tags. It builds signed APKs and bundles for Mainnet and Testnet, for Google Play upload and standalone release; - All the signing keys are merged into `signing.jks`. Sensitive keys are protected with passwords set in the GitHub environment.
- Loading branch information
Showing
9 changed files
with
211 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Distribute builds for internal testing through Firebase | ||
|
||
on: | ||
push: | ||
# Run for QA builds and release candidates. | ||
tags: | ||
- "*-qa.*" | ||
- "*-rc.*" | ||
workflow_dispatch: | ||
|
||
env: | ||
java_version: "11" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: Internal testing | ||
url: https://console.firebase.google.com/project/concordiummobilewallet/appdistribution/ | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create Firebase credentials file | ||
run: 'echo "$CREDENTIALS" > app/app-distribution-credentials.json' | ||
shell: bash | ||
env: | ||
CREDENTIALS: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS}} | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "${{env.java_version}}" | ||
distribution: corretto | ||
cache: gradle | ||
|
||
- name: Check if build version matches the tag | ||
run: | | ||
buildVersion="$(./gradlew -q printVersionName)" | ||
tagVersion="${GITHUB_REF#refs/tags/}" | ||
if [ "$buildVersion" != "$tagVersion" ]; then | ||
echo "Build version '$buildVersion' doesn't match the tag '$tagVersion'" | ||
exit 1 | ||
fi | ||
shell: bash | ||
env: | ||
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }} | ||
|
||
- name: Build and distribute Testnet APK | ||
run: ./gradlew app:assembleTstnetRelease app:appDistributionUploadTstnetRelease --stacktrace | ||
|
||
- name: Build and distribute Stagenet APK | ||
run: ./gradlew app:assembleStagenetRelease app:appDistributionUploadStagenetRelease --stacktrace | ||
|
||
- name: Build and distribute Mainnet APK | ||
run: ./gradlew app:assembleMainnetRelease app:appDistributionUploadMainnetRelease --stacktrace | ||
|
||
- name: Upload the APKs | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: APKs | ||
path: app/build/outputs/**/*.apk | ||
compression-level: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Build release packages for Google Play and standalone publishing | ||
|
||
on: | ||
push: | ||
# Run only for releases: ignore versions with meta part (1.2.3-qa.1, 3.4.5-rc.2, etc). | ||
tags: | ||
- "*.*.*" | ||
- "!*-*" | ||
workflow_dispatch: | ||
|
||
env: | ||
java_version: "11" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: Releases | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create signing configuration files | ||
run: | | ||
echo "$PLAY_UPLOAD_SIGNING_PROPERTIES" > app/play-upload-signing.properties | ||
echo "$STANDALONE_RELEASE_SIGNING_PROPERTIES" > app/standalone-release-signing.properties | ||
shell: bash | ||
env: | ||
PLAY_UPLOAD_SIGNING_PROPERTIES: ${{secrets.PLAY_UPLOAD_SIGNING_PROPERTIES}} | ||
STANDALONE_RELEASE_SIGNING_PROPERTIES: ${{secrets.STANDALONE_RELEASE_SIGNING_PROPERTIES}} | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "${{env.java_version}}" | ||
distribution: corretto | ||
cache: gradle | ||
|
||
- name: Check if build version matches the tag | ||
run: | | ||
buildVersion="$(./gradlew -q printVersionName)" | ||
tagVersion="${GITHUB_REF#refs/tags/}" | ||
if [ "$buildVersion" != "$tagVersion" ]; then | ||
echo "Build version '$buildVersion' doesn't match the tag '$tagVersion'" | ||
exit 1 | ||
fi | ||
shell: bash | ||
env: | ||
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }} | ||
|
||
- name: Build Testnet APK for standalone release | ||
run: ./gradlew app:assembleTstnetRelease --stacktrace | ||
env: | ||
CONFIGURABLE_SIGNING_PROPERTIES_FILE: standalone-release-signing.properties | ||
|
||
- name: Build Testnet bundle for Google Play upload | ||
run: ./gradlew app:bundleTstnetRelease --stacktrace | ||
env: | ||
CONFIGURABLE_SIGNING_PROPERTIES_FILE: play-upload-signing.properties | ||
|
||
- name: Build Mainnet APK for standalone release | ||
run: ./gradlew app:assembleMainnetRelease --stacktrace | ||
env: | ||
CONFIGURABLE_SIGNING_PROPERTIES_FILE: standalone-release-signing.properties | ||
|
||
- name: Build Mainnet bundle for Google Play upload | ||
run: ./gradlew app:bundleMainnetRelease --stacktrace | ||
env: | ||
CONFIGURABLE_SIGNING_PROPERTIES_FILE: play-upload-signing.properties | ||
|
||
- name: Upload the APKs and bundles | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: APKs and bundles | ||
path: | | ||
app/build/outputs/**/*.apk | ||
app/build/outputs/**/*.aab | ||
compression-level: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,8 +39,3 @@ captures/ | |
*.iml | ||
.idea/ | ||
/workspace.xml | ||
|
||
# Keys and secrets | ||
*.jks | ||
!app/dev-only-signing.jks | ||
app/secret/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Common signature for developers to share APKs without reinstalling. | ||
# There is nothing sensitive here. | ||
storeFile=signing.jks | ||
storePassword=concordium | ||
keyAlias=dev-sign-1 | ||
keyPassword=concordium |
Binary file not shown.