From a45043424e7200c90b4b29fe6d6a74f51caf4be2 Mon Sep 17 00:00:00 2001 From: Fabian Zobrist Date: Sun, 25 Jun 2023 13:31:54 +0200 Subject: [PATCH] Use act runner --- .drone.yml | 89 ------------------------------ .gitea/workflows/buildAndroid.yaml | 16 ++++++ 2 files changed, 16 insertions(+), 89 deletions(-) delete mode 100644 .drone.yml create mode 100644 .gitea/workflows/buildAndroid.yaml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 195de40..0000000 --- a/.drone.yml +++ /dev/null @@ -1,89 +0,0 @@ ---- -kind: pipeline -type: docker -name: Android - -steps: -- name: prepare signing - image: busybox - environment: - STOREPASSWORD: - from_secret: StorePassword - KEYPASSWORD: - from_secret: KeyPassword - commands: - - touch keystore.properties - - echo "storePassword=$STOREPASSWORD" >> keystore.properties - - echo "keyPassword=$KEYPASSWORD" >> keystore.properties - - echo "keyAlias=key0" >> keystore.properties - - echo "storeFile=../AndroidKey" >> keystore.properties - -- name: generate versionCode - image: busybox - commands: - - touch version.properties - - let timestamp=$(date +%s)/10 - - echo "versionCode=$timestamp" >> version.properties - -- name: build - image: mingc/android-build-box - commands: - - ./gradlew test - - ./gradlew assembleRelease - - ./gradlew bundleRelease - -- name: upload latest apk - image: vividboarder/drone-webdav - settings: - file: app/build/outputs/apk/release/app-release.apk - destination: https://nextcloud.zobrist.me/remote.php/dav/files/deploy/TichuCounter/latest/app-release.apk - username: - from_secret: NextCloudUser - password: - from_secret: NextCloudPassword - -- name: upload latest bundle - image: vividboarder/drone-webdav - settings: - file: app/build/outputs/bundle/release/app-release.aab - destination: https://nextcloud.zobrist.me/remote.php/dav/files/deploy/TichuCounter/latest/app-release.aab - username: - from_secret: NextCloudUser - password: - from_secret: NextCloudPassword - -- name: upload tagged apk - image: vividboarder/drone-webdav - settings: - file: app/build/outputs/apk/release/app-release.apk - destination: 'https://nextcloud.zobrist.me/remote.php/dav/files/deploy/TichuCounter/tagged/app-release$DRONE_TAG.apk' - username: - from_secret: NextCloudUser - password: - from_secret: NextCloudPassword - when: - event: - - tag - -- name: upload tagged bundle - image: vividboarder/drone-webdav - settings: - file: app/build/outputs/bundle/release/app-release.aab - destination: 'https://nextcloud.zobrist.me/remote.php/dav/files/deploy/TichuCounter/tagged/app-release$DRONE_TAG.aab' - username: - from_secret: NextCloudUser - password: - from_secret: NextCloudPassword - when: - event: - - tag - -- name: slack notification - image: plugins/slack - settings: - webhook: - from_secret: SlackWebhook - when: - status: - - failure - - success \ No newline at end of file diff --git a/.gitea/workflows/buildAndroid.yaml b/.gitea/workflows/buildAndroid.yaml new file mode 100644 index 0000000..d9e3168 --- /dev/null +++ b/.gitea/workflows/buildAndroid.yaml @@ -0,0 +1,16 @@ +name: Build Android +on: [pull_request, push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout the code + uses: actions/checkout@v2 + - name: set up JDK + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + - name: Build the app + run: ./gradlew build \ No newline at end of file