Skip to content

Add github release action #163

Add github release action

Add github release action #163

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Snapshot build
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up android SDK
uses: android-actions/setup-android@v2
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
- name: Run tests
run: ./gradlew testDebugUnitTest
- uses: actions/cache@v3
id: debug-key-cache
with:
path: ~/.android/debug.keystore
key: debug-keystore
- name: Show signing report
run: ./gradlew signingReport
- name: Build snapshot
run: ./gradlew assembleNightly
- name: Upload APK
uses: actions/upload-artifact@v3 # v4 creates a zip archive of one file
with:
name: app-nightly.apk
path: app/build/outputs/apk/nightly/app-nightly.apk
- name: Upload proguard mappings
uses: actions/upload-artifact@v4
with:
name: proguard-mapping.zip
path: app/build/outputs/mapping/nightly/