Skip to content

Update build.yml

Update build.yml #16

Workflow file for this run

on:
push:
branches: master
tags:
- v*
release_build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2.6.0
- name: Setup JAVA 11
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 11
- name: Cache Gradle and wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
- name: Build Release apk
run: ./gradlew assembleRelease
- name: Build Release bundle
run: ./gradlew bundleRelease
- name: Upload Release Build to Artifacts
uses: actions/upload-artifact@v3
with:
name: release-artifacts
paths: |
app/build/outputs/apk/release/
app/build/outputs/bundle/release/
#4
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: true
files: |
app/build/outputs/apk/release/app-release.apk
app/build/outputs/bundle/release/app-release.aab