-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New build workflow for android beta to replace teamcity pipeline * Add build trigger to run on pull request as well * Added environment variable for iTunes connect, which isn't even really needed * Added quotes to secrets for echoing, copied build details from iOS build * Add a debugging step * Fixed with a newline hopefully * escape newline character * push the escape on the right line * Added new secret to auth with google play store * programmatically set build number * Fix syntax error * fix syntax error * fix syntax error * Make the fastlane fetch the last build number form google play store * only using node 14 and saving artifacts * deleted fastnale additional code; added few more line to debug working dir * fix the keystore filename * Simplified android build number calculation Co-authored-by: Julia Branke <JuliaBrigitte@users.noreply.github.com> * Give GITHUB_TOKEN write permissions * Upload apk to internal * Explicitly use Java 11. Also dry run again * Commenting out iOS specific env vars * Try to fix syntax error * ANDROID_RELEASE_STREAM is not a secret * Add back in ITUNES_CONNECT_SHARED_SECRET * Use .nvmrc file for node version in ci Co-authored-by: Kenny <Jorge.Azevedo@guardian.co.uk> * New ci workflow file for release android-release.yml, not uploading for now (waiting for key approval) Co-authored-by: Kenny <Jorge.Azevedo@guardian.co.uk> * Disable running of the release workflow on push for now Co-authored-by: Jorge <Jorge.Azevedo@guardian.co.uk> * Remove commented out vars / steps * Indent fix and upload artifact update Co-authored-by: Julia Branke <JuliaBrigitte@users.noreply.github.com> * Reduce permissions to contents write * Remove 14001358 from minor version calc * Use SHA to create release (instead of branch name) * Log github.ref as a test on push Co-authored-by: Jorge <Jorge.Azevedo@guardian.co.uk> Co-authored-by: Michael <Michael.Clapham@guardian.co.uk> * Revert change in make-release and delete test echo Co-authored-by: Jorge <Jorge.Azevedo@guardian.co.uk> Co-authored-by: Michael <Michael.Clapham@guardian.co.uk> * Add beta workflow updates to release * Echo build number so we can confirm it more easily * Better artifact names * Remove debugging commands * Add optional track param to release script * Actually pass track internal/production to script * Undo unintentional linting * Revert build.gradle * Use GHA output to manage version code * Update comments on build number calculation * Disable run on every push (testing only) --------- Co-authored-by: Mohammad Haque <mohammad.haque@theguardian.com> Co-authored-by: Michael Clapham <michaeljclapham@gmail.com> Co-authored-by: Julia Branke <JuliaBrigitte@users.noreply.github.com> Co-authored-by: Julia Branke <Julia.Branke@guardian.co.uk> Co-authored-by: Kenny <Jorge.Azevedo@guardian.co.uk> Co-authored-by: Michael <Michael.Clapham@guardian.co.uk>
- Loading branch information
1 parent
9690e4a
commit f8cb5a2
Showing
6 changed files
with
186 additions
and
13 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,85 @@ | ||
name: android-beta | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: 'projects/Mallard/.nvmrc' | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7.3 | ||
bundler-cache: true | ||
|
||
- name: inject credentials | ||
run: | | ||
echo -e "\n\n${{ secrets.ANDROID_GRADLE_PROPERTIES }}" >> projects/Mallard/android/gradle.properties | ||
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > projects/Mallard/android/app/editions-release-2023.keystore | ||
# We add ~900 to the github run number to syncronise it with the last beta build number from TeamCity | ||
- name: set build number | ||
run: | | ||
echo "BUILD_NUMBER=$(($GITHUB_RUN_NUMBER + 894))" >> "$GITHUB_ENV" | ||
- run: echo $BUILD_NUMBER | ||
|
||
- name: install | ||
run: | | ||
make install | ||
- name: validate | ||
run: make validate-Mallard | ||
|
||
- name: Build APK | ||
id: build_app | ||
run: | | ||
./build_apk.sh BETA | ||
env: | ||
ID_ACCESS_TOKEN: ${{ secrets.ID_ACCESS_TOKEN }} | ||
ID_API_URL: ${{ secrets.ID_API_URL }} | ||
LOGGING_API_KEY: ${{ secrets.LOGGING_API_KEY }} | ||
ITUNES_CONNECT_SHARED_SECRET: ${{ secrets.ITUNES_CONNECT_SHARED_SECRET }} | ||
MEMBERS_DATA_API_URL: ${{ secrets.MEMBERS_DATA_API_URL }} | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_CLI_EXECUTABLE: ${{ secrets.SENTRY_CLI_EXECUTABLE }} | ||
SENTRY_DEFAULTS_ORG: ${{ secrets.SENTRY_DEFAULTS_ORG }} | ||
SENTRY_DEFAULTS_PROJECT: ${{ secrets.SENTRY_DEFAULTS_PROJECT }} | ||
SENTRY_DEFAULTS_URL: ${{ secrets.SENTRY_DEFAULTS_URL }} | ||
SENTRY_DSN_URL: ${{ secrets.SENTRY_DSN_URL }} | ||
FASTLANE_USER: ${{ secrets.FASTLANE_USER }} | ||
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} | ||
ANDROID_RELEASE_STREAM: 'DEBUG' | ||
USE_SANDBOX_IAP: 'true' | ||
FASTLANE_TEAM_ID: ${{ secrets.FASTLANE_TEAM_ID }} | ||
SUPPLY_JSON_KEY_DATA: ${{ secrets.SUPPLY_JSON_KEY_DATA }} | ||
BUILD_NUMBER: ${{ env.BUILD_NUMBER }} | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: internal-apk | ||
path: | | ||
projects/Mallard/android/app/build/outputs/apk/release/app-release.apk | ||
- name: tag release on github | ||
working-directory: script | ||
run: node make-release.js ${{ github.sha }} ${{ github.ref }} ${{ steps.build_app.outputs.VERSION_CODE }} android internal | ||
env: | ||
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,85 @@ | ||
name: android-release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: 'projects/Mallard/.nvmrc' | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7.3 | ||
bundler-cache: true | ||
|
||
- name: inject credentials | ||
run: | | ||
echo -e "\n\n${{ secrets.ANDROID_GRADLE_PROPERTIES }}" >> projects/Mallard/android/gradle.properties | ||
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > projects/Mallard/android/app/editions-release-2023.keystore | ||
# We add 50 to the github run number to syncronise it with the last release build number from TeamCity | ||
- name: set build number | ||
run: | | ||
echo "BUILD_NUMBER=$(($GITHUB_RUN_NUMBER + 50))" >> "$GITHUB_ENV" | ||
- run: echo $BUILD_NUMBER | ||
|
||
- name: install | ||
run: | | ||
make install | ||
- name: validate | ||
run: make validate-Mallard | ||
|
||
- name: Build APK | ||
id: build_app | ||
run: | | ||
./build_apk.sh RELEASE | ||
env: | ||
ID_ACCESS_TOKEN: ${{ secrets.ID_ACCESS_TOKEN }} | ||
ID_API_URL: ${{ secrets.ID_API_URL }} | ||
LOGGING_API_KEY: ${{ secrets.LOGGING_API_KEY }} | ||
ITUNES_CONNECT_SHARED_SECRET: ${{ secrets.ITUNES_CONNECT_SHARED_SECRET }} | ||
MEMBERS_DATA_API_URL: ${{ secrets.MEMBERS_DATA_API_URL }} | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_CLI_EXECUTABLE: ${{ secrets.SENTRY_CLI_EXECUTABLE }} | ||
SENTRY_DEFAULTS_ORG: ${{ secrets.SENTRY_DEFAULTS_ORG }} | ||
SENTRY_DEFAULTS_PROJECT: ${{ secrets.SENTRY_DEFAULTS_PROJECT }} | ||
SENTRY_DEFAULTS_URL: ${{ secrets.SENTRY_DEFAULTS_URL }} | ||
SENTRY_DSN_URL: ${{ secrets.SENTRY_DSN_URL }} | ||
FASTLANE_USER: ${{ secrets.FASTLANE_USER }} | ||
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} | ||
ANDROID_RELEASE_STREAM: 'RELEASE' | ||
USE_SANDBOX_IAP: 'true' | ||
FASTLANE_TEAM_ID: ${{ secrets.FASTLANE_TEAM_ID }} | ||
SUPPLY_JSON_KEY_DATA: ${{ secrets.SUPPLY_JSON_KEY_DATA }} | ||
BUILD_NUMBER: ${{ env.BUILD_NUMBER }} | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: release-apk | ||
path: | | ||
projects/Mallard/android/app/build/outputs/apk/release/app-release.apk | ||
- name: tag release on github | ||
working-directory: script | ||
run: node make-release.js ${{ github.sha }} ${{ github.ref }} ${{ steps.build_app.outputs.VERSION_CODE }} android production | ||
env: | ||
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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