ci debug workflow #119
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
name: ci debug workflow | |
on: | |
workflow_dispatch: | |
jobs: | |
debug_build: | |
runs-on: [self-hosted, linux] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1.2' | |
bundler-cache: true | |
- name: Decode local properties | |
id: localProperties | |
uses: timheuer/[email protected] | |
with: | |
fileName: 'local.properties' | |
encodedString: ${{ secrets.LOCAL_PROPERTIES }} | |
- run: cp "${{ steps.localProperties.outputs.filePath }}" "./" | |
- name: Decode service credentials file | |
id: serviceCredentialsFile | |
uses: timheuer/[email protected] | |
with: | |
fileName: 'service_credentials_file_dev.json' | |
encodedString: ${{ secrets.SERVICE_CREDENTIALS_FILE_DEV }} | |
- run: cp "${{ steps.serviceCredentialsFile.outputs.filePath }}" "./fastlane" | |
- name: Decode google-services json file | |
id: googleServicesJsonFile | |
uses: timheuer/[email protected] | |
with: | |
fileName: 'google-services.json' | |
encodedString: ${{ secrets.FIREBASE_JSON_BASE64_DEV}} | |
- run: cp "${{ steps.googleServicesJsonFile.outputs.filePath }}" "./app/src/debug" | |
- name: check googleServicesJsonFile exist | |
run: ls -al "./app/src/debug" | |
- name: Get the version name | |
id: versionNameId | |
run: echo "versionName=$(cat app/build.gradle | grep " versionName " | awk -F '"' '{print $2}')" >> $GITHUB_ENV | |
- name: Get the version code | |
id: versionCodeId | |
run: echo "versionCode=$(cat app/build.gradle | grep " versionCode " | awk '{print $2}')" >> $GITHUB_ENV | |
- run: bundle exec fastlane dev | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
- name: Configure AWS credentials from Production account | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.S3_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.S3_SECRET_ACCESS_KEY }} | |
aws-region: ap-northeast-1 | |
env: | |
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} | |
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }} | |
- name: Deploy (Copy files to s3 bucket with the AWS CLI) | |
run: aws s3 cp app/build/outputs/apk/debug/app-debug.apk s3://owlting-qa/owlwallet_android/${{ env.versionName }}.${{ env.versionCode }}/owlwallet-dev-${{ env.versionName }}.${{ env.versionCode }}.apk --acl public-read |