Skip to content

Revert "Try to package apk" #7

Revert "Try to package apk"

Revert "Try to package apk" #7

Workflow file for this run

name: Android CI
on:
push:
branches:
- main
paths:
- 'Android-app/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x ./Android-app/gradlew
- name: Build with Gradle
run: ./gradlew build
working-directory: ./Android-app
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: app-release.apk
path: Android-app/app/build/outputs/apk/release/app-release-unsigned.apk
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Android-app/app/build/outputs/apk/release/app-release-unsigned.apk
asset_name: app-release-unsigned.apk
asset_content_type: application/vnd.android.package-archive