Skip to content

Commit

Permalink
Merge branch 'build-test-apk-in-ci' into troubleshoot-gson-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
amberin committed Oct 24, 2024
2 parents f72bc5f + bf50e55 commit c621840
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build-test-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build test APKs and store artifacts

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

#permissions:
# contents: write

jobs:
build-prerelease:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Setup build tool version variable
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION
# F-Droid APK

- name: Assemble F-Droid APK
run: ./gradlew assembleFdroidRelease --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# "Premium" APK

- name: Add Dropbox app identifier
shell: bash
run: |
echo "dropbox.app_key = \"${{ secrets.DROPBOX_APP_KEY }}\"" >> app.properties
echo "dropbox.app_key_schema = \"db-${{ secrets.DROPBOX_APP_KEY }}\"" >> app.properties
- name: Assemble "premium" APK
run: ./gradlew assemblePremiumRelease --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Upload artifacts

- name: Upload artifacts and create Github pre-release draft
uses: softprops/action-gh-release@v1
with:
files: |
*.apk

0 comments on commit c621840

Please sign in to comment.