-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: [sc-12915] Add GitHub Actions to build sandbox, staging and pr…
…oduction bundles required for Tramline (#5143) Story details: https://app.shortcut.com/simpledotorg/story/12915
- Loading branch information
1 parent
9479980
commit e0ad1c1
Showing
6 changed files
with
250 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Build production app bundle | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tramline-input: | ||
description: "Tramline input" | ||
required: false | ||
|
||
jobs: | ||
build: | ||
runs-on: [ ubuntu-latest ] | ||
env: | ||
TERM: dumb | ||
ORG_GRADLE_PROJECT_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | ||
ORG_GRADLE_PROJECT_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | ||
ORG_GRADLE_PROJECT_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
steps: | ||
- name: Configure Tramline | ||
id: tramline | ||
uses: tramlinehq/[email protected] | ||
with: | ||
input: ${{ github.event.inputs.tramline-input }} | ||
|
||
- name: Setup version code and name | ||
id: version_code_and_name | ||
run: | | ||
VERSION_NAME=${{ steps.tramline.outputs.version_name:-"1.0.0" }} | ||
VERSION_CODE=${{ steps.tramline.outputs.version_code:-"1" }} | ||
echo "ORG_GRADLE_PROJECT_VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV | ||
echo "ORG_GRADLE_PROJECT_VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV | ||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: zulu | ||
cache: 'gradle' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Decrypt secrets | ||
run: gpg --batch --yes --quiet --decrypt --passphrase=${{ secrets.KEYSTORE_PASSPHRASE }} --output release/simple.store release/simple.gpg | ||
|
||
- name: Build release bundle | ||
run: | | ||
./gradlew | ||
-PrunProguard=true | ||
-PsentryUploadProguard=true | ||
-PmanifestEndpoint=MANIFEST_ENDPOINT_PRODUCTION | ||
-PandroidNdkVersion=$NDK_VERSION | ||
-PsentryDsn=${{ secrets.SENTRY_DSN }} | ||
-PsentryEnvironment=production | ||
-PdisableScreenshot=true | ||
-PallowRootedDevice=false | ||
-PdatadogApplicationId=${{ secrets.DATADOG_APPLICATION_ID }} | ||
-PdatadogClientToken=${{ secrets.DATADOG_CLIENT_TOKEN }} | ||
-PdatadogEnvironment=production | ||
-PsentryOrg=$SENTRY_ORG | ||
-PsentryProject=$SENTRY_PROJECT | ||
-PsentryAuthToken=${{ secrets.SENTRY_AUTH_TOKEN }} | ||
bundleProductionRelease | ||
- name: Upload release bundle | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release.aab | ||
path: app/build/outputs/bundle/productionRelease/app-production-release.aab | ||
|
||
- name: Clean secrets | ||
run: | | ||
rm -f release/simple.store | ||
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,74 @@ | ||
name: Build staging app bundle | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tramline-input: | ||
description: "Tramline input" | ||
required: false | ||
|
||
jobs: | ||
build: | ||
runs-on: [ ubuntu-latest ] | ||
env: | ||
TERM: dumb | ||
ORG_GRADLE_PROJECT_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | ||
ORG_GRADLE_PROJECT_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | ||
ORG_GRADLE_PROJECT_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
steps: | ||
- name: Configure Tramline | ||
id: tramline | ||
uses: tramlinehq/[email protected] | ||
with: | ||
input: ${{ github.event.inputs.tramline-input }} | ||
|
||
- name: Setup version code and name | ||
id: version_code_and_name | ||
run: | | ||
VERSION_NAME=${{ steps.tramline.outputs.version_name:-"1.0.0" }} | ||
VERSION_CODE=${{ steps.tramline.outputs.version_code:-"1" }} | ||
echo "ORG_GRADLE_PROJECT_VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV | ||
echo "ORG_GRADLE_PROJECT_VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV | ||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: zulu | ||
cache: 'gradle' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Decrypt secrets | ||
run: gpg --batch --yes --quiet --decrypt --passphrase=${{ secrets.KEYSTORE_PASSPHRASE }} --output release/simple.store release/simple.gpg | ||
|
||
- name: Build release bundle | ||
run: | | ||
./gradlew | ||
-PrunProguard=true | ||
-PmanifestEndpoint=$MANIFEST_ENDPOINT_SANDBOX | ||
-PandroidNdkVersion=$NDK_VERSION | ||
-PsentryDsn=${{ secrets.SENTRY_DSN }} | ||
-PsentryEnvironment=sandbox | ||
-PdatadogApplicationId=${{ secrets.DATADOG_APPLICATION_ID }} | ||
-PdatadogClientToken=${{ secrets.DATADOG_CLIENT_TOKEN }} | ||
-PdatadogEnvironment=sandbox | ||
-PsentryOrg=$SENTRY_ORG | ||
-PsentryProject=$SENTRY_PROJECT | ||
-PsentryAuthToken=${{ secrets.SENTRY_AUTH_TOKEN }} | ||
bundleSandboxRelease | ||
- name: Upload release bundle | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release.aab | ||
path: app/build/outputs/bundle/sandboxRelease/app-sandbox-release.aab | ||
|
||
- name: Clean secrets | ||
run: | | ||
rm -f release/simple.store | ||
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,74 @@ | ||
name: Build staging app bundle | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tramline-input: | ||
description: "Tramline input" | ||
required: false | ||
|
||
jobs: | ||
build: | ||
runs-on: [ ubuntu-latest ] | ||
env: | ||
TERM: dumb | ||
ORG_GRADLE_PROJECT_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | ||
ORG_GRADLE_PROJECT_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | ||
ORG_GRADLE_PROJECT_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
steps: | ||
- name: Configure Tramline | ||
id: tramline | ||
uses: tramlinehq/[email protected] | ||
with: | ||
input: ${{ github.event.inputs.tramline-input }} | ||
|
||
- name: Setup version code and name | ||
id: version_code_and_name | ||
run: | | ||
VERSION_NAME=${{ steps.tramline.outputs.version_name:-"1.0.0" }} | ||
VERSION_CODE=${{ steps.tramline.outputs.version_code:-"1" }} | ||
echo "ORG_GRADLE_PROJECT_VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV | ||
echo "ORG_GRADLE_PROJECT_VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV | ||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: zulu | ||
cache: 'gradle' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Decrypt secrets | ||
run: gpg --batch --yes --quiet --decrypt --passphrase=${{ secrets.KEYSTORE_PASSPHRASE }} --output release/simple.store release/simple.gpg | ||
|
||
- name: Build release bundle | ||
run: | | ||
./gradlew | ||
-PrunProguard=true | ||
-PmanifestEndpoint=$MANIFEST_ENDPOINT_STAGING | ||
-PandroidNdkVersion=$NDK_VERSION | ||
-PsentryDsn=${{ secrets.SENTRY_DSN }} | ||
-PsentryEnvironment=staging | ||
-PdatadogApplicationId=${{ secrets.DATADOG_APPLICATION_ID }} | ||
-PdatadogClientToken=${{ secrets.DATADOG_CLIENT_TOKEN }} | ||
-PdatadogEnvironment=staging | ||
-PsentryOrg=$SENTRY_ORG | ||
-PsentryProject=$SENTRY_PROJECT | ||
-PsentryAuthToken=${{ secrets.SENTRY_AUTH_TOKEN }} | ||
bundleStagingRelease | ||
- name: Upload release bundle | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release.aab | ||
path: app/build/outputs/bundle/stagingRelease/app-staging-release.aab | ||
|
||
- name: Clean secrets | ||
run: | | ||
rm -f release/simple.store | ||
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
Binary file not shown.