chore: Upload aab files on build #25
Workflow file for this run
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: Deploy releases | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: generate changelog | |
id: changelog | |
uses: metcalfc/changelog-generator@v3.0.0 | |
with: | |
myToken: ${{ secrets.GITHUB_TOKEN }} | |
- name: "Setup JDK 11" | |
id: setup-java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: "11" | |
- id: vars | |
run: | | |
echo ::set-output name=tag::${GITHUB_REF:10} | |
- id: env | |
run: | | |
echo "LITERARY_CLOCK_RELEASE_TAG=${{ steps.vars.outputs.tag }}" >> $GITHUB_ENV | |
echo "ACRA_URI=${{ secrets.ACRA_URI }}" >> $GITHUB_ENV | |
echo "ACRA_USERNAME=${{ secrets.ACRA_USERNAME }}" >> $GITHUB_ENV | |
echo "ACRA_PASSWORD=${{ secrets.ACRA_PASSWORD }}" >> $GITHUB_ENV | |
- name: copy secrets | |
run: | | |
echo ${{ secrets.GOOGLE_SERVICES }} | base64 -d | zcat >> app/google-services.json | |
echo ${{ secrets.KEYSTORE_B64 }} | base64 -d | zcat >> app/literaryclock-release.keystore | |
echo ${{ secrets.KEYSTORE_PROPS_B64 }} | base64 -d | zcat >> app/literaryclock-release.properties | |
- name: "./gradlew clean bundleProdRelease assembleProdRelease" | |
uses: eskatos/gradle-command-action@v2 | |
env: | |
JAVA_HOME: ${{ steps.setup-java.outputs.path }} | |
with: | |
arguments: clean bundleProdRelease assembleProdRelease | |
- name: 'Upload .aab' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-android | |
path: | | |
app/build/outputs/**/*.aab | |
retention-days: 7 | |
- name: create release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: ${{ steps.changelog.outputs.changelog }} | |
draft: false | |
prerelease: false | |
- name: upload Release [ps] apk | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: app/build/outputs/apk/prod/release/literaryclock-prod-release.apk | |
asset_name: literaryclock-release-${{ steps.vars.outputs.tag }}.apk | |
asset_content_type: application/zip | |
- name: upload to play store | |
uses: r0adkll/upload-google-play@v1.0.15 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT }} | |
packageName: com.artemchep.literaryclock | |
releaseFiles: app/build/outputs/bundle/prodRelease/literaryclock-prod-release.aab |