Skip to content

Merge pull request #133 from toquete/v1.1.1 #181

Merge pull request #133 from toquete/v1.1.1

Merge pull request #133 from toquete/v1.1.1 #181

Workflow file for this run

name: CD
'on':
push:
branches:
- master
tags:
- v*
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }}
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
SERVICE_ACCOUNT_JSON: ${{ secrets.SERVICE_ACCOUNT_JSON }}
jobs:
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: '17'
- name: Create keystore file
run: echo $KEYSTORE_FILE | base64 -di > ${{ github.workspace }}/app/release.jks
- name: Create keystore.properties file
run: echo $KEYSTORE_PROPERTIES | base64 -di > ${{ github.workspace }}/keystore.properties
- name: Create Google Services JSON
run: |
mkdir ${{ github.workspace }}/app/src/prod
echo $GOOGLE_SERVICES_JSON | base64 -di > ${{ github.workspace }}/app/src/prod/google-services.json
- name: Create service account JSON
run: echo $SERVICE_ACCOUNT_JSON | base64 -di > ${{ github.workspace }}/service-account.json
- name: Build release APK
uses: gradle/gradle-build-action@v2.11.1
with:
arguments: ':app:assembleProdRelease'
- name: Build release bundle
uses: gradle/gradle-build-action@v2.11.1
with:
arguments: ':app:bundleProdRelease'
- name: Upload Release Build to Artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: |
app/build/outputs/apk/prod/release/
app/build/outputs/bundle/prodRelease/
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
draft: true
files: app/build/outputs/apk/prod/release/app-prod-release.apk
generate_release_notes: true
- name: Upload app to Google Play
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: ${{ github.workspace }}/service-account.json
packageName: com.toquete.boxbox
track: internal
status: draft
releaseFiles: app/build/outputs/bundle/prodRelease/app-prod-release.aab