Use act runner
All checks were successful
Build Android / build (push) Has been cancelled

This commit is contained in:
2023-06-25 13:31:54 +02:00
parent 18326e952f
commit a45043424e
2 changed files with 16 additions and 89 deletions

View File

@@ -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

View File

@@ -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