diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 0fc867b..f80e55f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -14,5 +14,6 @@ jobs: with: distribution: 'temurin' java-version: 21 + cache: 'gradle' - name: Build with Gradle run: ./gradlew build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4f227ea --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + - name: set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: 21 + distribution: 'temurin' + cache: 'gradle' + - name: Build with Gradle + run: ./gradlew assembleRelease + - name: Sign app + uses: r0adkll/sign-android-release@v1 + id: sign_app + with: + releaseDirectory: app/build/outputs/apk/release + signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} + alias: ${{ secrets.ANDROID_KEY_ALIAS }} + keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} + env: + BUILD_TOOLS_VERSION: "34.0.0" + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + files: ${{steps.sign_app.outputs.signedReleaseFile}}