From ab6f93ff312a58ef9193ecabc0e19dfd4c252149 Mon Sep 17 00:00:00 2001 From: Fernando Valverde Date: Mon, 16 Nov 2020 08:51:47 -0600 Subject: [PATCH 1/3] First test version --- .github/workflows/beta-release.yml | 75 ++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/beta-release.yml diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml new file mode 100644 index 0000000..3bcf223 --- /dev/null +++ b/.github/workflows/beta-release.yml @@ -0,0 +1,75 @@ +name: Release (Beta) + +on: + push: + tags: + - v*.*.* + branches: + - fdoxyz/beta-release-workflow + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-ruby@v1 + with: + ruby-version: '2.7' + + - name: Cache Ruby - Bundler + uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + + - name: Cache Gradle + uses: actions/cache@v1 + with: + path: ~/.gradle/caches/ + key: cache-clean-gradle-${{ matrix.os }}-${{ matrix.jdk }} + + - name: Cache Gradle Wrapper + uses: actions/cache@v1 + with: + path: ~/.gradle/wrapper/ + key: cache-clean-wrapper-${{ matrix.os }}-${{ matrix.jdk }} + + - name: Grant Permission to Execute + run: chmod +x gradlew + + - name: Install bundle + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + + - name: Configure Keystore + run: | + echo "This will fail because we don't have the secrets configured yet" + echo "$ANDROID_KEYSTORE_FILE" > keystore.jks.b64 + base64 -d -i keystore.jks.b64 > app/keystore.jks + echo "storeFile=keystore.jks" >> keystore.properties + echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> keystore.properties + echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> keystore.properties + echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> keystore.properties + env: + ANDROID_KEYSTORE_FILE: ${{ secrets.ANDROID_KEYSTORE_FILE }} + KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }} + KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }} + KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }} + + - name: Create Google Play Config file and google-services.json + run : | + echo "$PLAY_CONFIG_JSON" > play_config.json.b64 + base64 -d -i play_config.json.b64 > play_config.json + echo "$GOOGLE_SERVICES_JSON" > google-services.json.b64 + base64 -d -i google-services.json.b64 > app/google-services.json + env: + PLAY_CONFIG_JSON: ${{ secrets.PLAY_CONFIG_JSON }} + GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} + + - name: Distribute app to Beta track 🚀 + run: bundle exec fastlane beta \ No newline at end of file From b5e09fac8904646280435a3c1e8eebfb327b08f4 Mon Sep 17 00:00:00 2001 From: Fernando Valverde Date: Mon, 16 Nov 2020 09:36:34 -0600 Subject: [PATCH 2/3] Rename google-service-account-user.json in beta release workflow --- .github/workflows/beta-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index 3bcf223..49f51aa 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -63,12 +63,12 @@ jobs: - name: Create Google Play Config file and google-services.json run : | - echo "$PLAY_CONFIG_JSON" > play_config.json.b64 - base64 -d -i play_config.json.b64 > play_config.json + echo "$SERVICE_ACCOUNT_JSON" > google-service-account-user.json.b64 + base64 -d -i google-service-account-user.json.b64 > google-service-account-user.json echo "$GOOGLE_SERVICES_JSON" > google-services.json.b64 base64 -d -i google-services.json.b64 > app/google-services.json env: - PLAY_CONFIG_JSON: ${{ secrets.PLAY_CONFIG_JSON }} + SERVICE_ACCOUNT_JSON: ${{ secrets.SERVICE_ACCOUNT_JSON }} GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} - name: Distribute app to Beta track 🚀 From 70209a788cbd4e077a3528b0dc7671220c87e985 Mon Sep 17 00:00:00 2001 From: Fernando Valverde Date: Mon, 16 Nov 2020 11:00:59 -0600 Subject: [PATCH 3/3] Ignore keystore.properties file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 229d4c2..402f341 100644 --- a/.gitignore +++ b/.gitignore @@ -76,6 +76,7 @@ captures/ # Uncomment the following lines if you do not want to check your keystore files in. *.jks *.keystore +keystore.properties # External native build folder generated in Android Studio 2.2 and later .externalNativeBuild