-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from ImaginativeShohag/dev
Fix GH action issues
- Loading branch information
Showing
36 changed files
with
1,148 additions
and
868 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,66 @@ | ||
name: Android Build & Deploy (Beta) | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: [ "dev" ] | ||
|
||
jobs: | ||
deploy: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up ruby env | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2.2 | ||
bundler-cache: true | ||
|
||
- name: Initialize local properties | ||
env: | ||
MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }} | ||
CMS_API_KEY: ${{ secrets.CMS_API_KEY }} | ||
run: echo MAPS_API_KEY="$MAPS_API_KEY" >> ./local.properties ; echo CMS_API_KEY="$CMS_API_KEY" >> ./local.properties | ||
|
||
# Set up your GitHub Actions workflow with a specific version of Java | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
- name: Run tests | ||
run: bundle exec fastlane android test | ||
|
||
- name: Decode Service Account Key JSON File | ||
uses: timheuer/base64-to-file@v1 | ||
id: service_account_json_file | ||
with: | ||
fileName: "serviceAccount.json" | ||
encodedString: ${{ secrets.PLAY_STORE_CREDENTIALS }} | ||
|
||
- name: Decode Keystore File | ||
uses: timheuer/base64-to-file@v1 | ||
id: android_keystore | ||
with: | ||
fileName: "android_keystore.keystore" | ||
encodedString: ${{ secrets.KEYSTORE }} | ||
|
||
- name: Build & deploy Android release | ||
run: bundle exec fastlane android beta | ||
env: | ||
ANDROID_KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }} | ||
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | ||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS}} | ||
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | ||
GOOGLE_PLAY_SERVICE_ACCOUNT_KEY: ${{ steps.service_account_json_file.outputs.filePath }} | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: assets | ||
path: | | ||
${{ github.workspace }}/app/build/outputs/bundle/release |
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,63 @@ | ||
name: Android Build & Deploy (Production) | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up ruby env | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2.2 | ||
bundler-cache: true | ||
|
||
- name: Initialize local properties | ||
env: | ||
MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }} | ||
CMS_API_KEY: ${{ secrets.CMS_API_KEY }} | ||
run: echo MAPS_API_KEY="$MAPS_API_KEY" >> ./local.properties ; echo CMS_API_KEY="$CMS_API_KEY" >> ./local.properties | ||
|
||
# Set up your GitHub Actions workflow with a specific version of Java | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
- name: Run tests | ||
run: bundle exec fastlane android test | ||
|
||
- name: Decode Service Account Key JSON File | ||
uses: timheuer/base64-to-file@v1 | ||
id: service_account_json_file | ||
with: | ||
fileName: "serviceAccount.json" | ||
encodedString: ${{ secrets.PLAY_STORE_CREDENTIALS }} | ||
|
||
- name: Decode Keystore File | ||
uses: timheuer/base64-to-file@v1 | ||
id: android_keystore | ||
with: | ||
fileName: "android_keystore.keystore" | ||
encodedString: ${{ secrets.KEYSTORE }} | ||
|
||
- name: Build & deploy Android release | ||
run: bundle exec fastlane android deploy | ||
env: | ||
ANDROID_KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }} | ||
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | ||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS}} | ||
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | ||
GOOGLE_PLAY_SERVICE_ACCOUNT_KEY: ${{ steps.service_account_json_file.outputs.filePath }} | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: assets | ||
path: | | ||
${{ github.workspace }}/app/build/outputs/bundle/release |
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
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
Oops, something went wrong.