* Compose Viewer shows file sizes now #13
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: Add APK to latest release | |
env: | |
main_project_module: demo | |
assemble_type: assembleGithub | |
build_type: github | |
apk_name_unsigned_apk: demo-github.apk | |
on: | |
push: | |
tags: | |
- '*' | |
# push: | |
# branches: | |
# - 'release/**' | |
# | |
# # Allows you to run this workflow manually from the Actions tab | |
# workflow_dispatch: | |
jobs: | |
build: | |
name: Building APK and adding it to the latest release | |
runs-on: ubuntu-latest | |
steps: | |
# 1) Checkout | |
- uses: actions/checkout@v3 | |
# 2) Setup JAVA | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
# 3) gradlew permissions | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
# 4) build apk | |
- name: Build with Gradle | |
run: ./gradlew ${{ env.assemble_type }} --stacktrace | |
# 5) upload apk | |
# - name: Upload APK Build Artifact | |
# uses: actions/upload-artifact@master | |
# with: | |
# name: ${{ github.repository }} - APK(s) release generated | |
# path: ${{ env.main_project_module }}/build/outputs/apk/release/ | |
# 6) create release | |
# demo-release-unsigned.apk | |
- name: Upload APK to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ env.main_project_module }}/build/outputs/apk/${{ env.build_type }}/${{ env.apk_name_unsigned_apk }} | |
asset_name: demo-$tag.apk | |
tag: ${{ github.ref }} | |
#overwrite: true | |
#body: "Release created by action" |