Reimplement the measurement app in Kotlin (#13) #32
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: LCL Measurement Tool CI | |
env: | |
# The name of the main module repository | |
main_project_module: app | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew app:build | |
- name: Run Tests | |
run: ./gradlew app:testDemoDebugUnitTest | |
- name: Generate APK Debug Build with Gradle (Dev) | |
if: startsWith(github.ref, 'refs/tags/') | |
run: ./gradlew assembleDevDebug | |
- name: Generate APK Release Build with Gradle (Full) | |
if: startsWith(github.ref, 'refs/tags/') | |
run: ./gradlew assembleFullRelease | |
- name: Upload to Github Page | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
${{ env.main_project_module }}/build/outputs/apk/dev/debug/app-dev-debug.apk | |
${{ env.main_project_module }}/build/outputs/apk/full/debug/app-full-release.apk | |
draft: true | |
prerelease: true |