Skip to content

Commit

Permalink
Publish internal-release to alpha track.
Browse files Browse the repository at this point in the history
  • Loading branch information
seanwu1105 committed Oct 5, 2020
1 parent 3886fd6 commit c32f982
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 7 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/production-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: production-release
on:
release:
types: [released]

jobs:
alpha-track:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Extract branch name
id: extract_branch
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"

- name: Set up JDK
if: steps.extract_branch.outputs.branch == 'develop'
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Test and build internal-release bundle (AAB)
if: steps.extract_branch.outputs.branch == 'develop'
env:
NUMBERS_STORAGE_BASE_URL: ${{ secrets.NUMBERS_STORAGE_BASE_URL }}
run: |
./gradlew testInternalRelease
./gradlew bundleInternalRelease
- name: Sign AAB
id: sign_aab
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: ./app/build/outputs/bundle/internalRelease
signingKeyBase64: ${{ secrets.KEYSTORE_FILE }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}

- name: Create service_account.json
id: createServiceAccount
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json

- name: Deploy to Play Store (internal)
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: io.numbersprotocol.starlingcapture
releaseFile: ./app/build/outputs/bundle/internalRelease/app-internal-release.aab
track: alpha
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: qa-release
on: workflow_dispatch

jobs:
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
echo "::set-output name=versionCode::$(./gradlew -q printVersionCode)"
echo "::set-output name=versionName::$(./gradlew -q printVersionName)"
- name: Create GitHub QA release draft
- name: Create GitHub QA prerelease
id: create_release
if: steps.extract_branch.outputs.branch == 'develop'
uses: actions/create-release@v1
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.6.5 - 2020-10-06

### Fixed

- Make the application ID (package name) to be the same among all product flavors (master/internal).

## 1.6.4 - 2020-10-05

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Example:
1. Increase the `versionName` and `versionCode` in app/build.gradle file.
1. Update the CHANGELOG.md file.
1. Commit and push the update.
1. Go to __Action > release > Run workflow > Branch: develop > Run workflow__ to automatically create GitHub Release with development tag and deploy the master-release app to internal track on the Google Play Console.
1. Go to __Action > release > Run workflow > Branch: develop > Run workflow__ to automatically create GitHub Release with development tag and deploy apps on the Google Play Console.

## Caveat

Expand Down
7 changes: 3 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ android {
applicationId "io.numbersprotocol.starlingcapture"
minSdkVersion 26
targetSdkVersion 30
versionCode 5
versionName "1.6.4"
versionCode 6
versionName "1.6.5"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -57,11 +57,10 @@ android {
productFlavors {
master {
dimension "mode"
versionNameSuffix "-master"
}
internal {
dimension "mode"
applicationIdSuffix ".internal"
versionNameSuffix "-internal"
}
}

Expand Down

0 comments on commit c32f982

Please sign in to comment.