Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1819802748 | |||
| a099659b2c | |||
| 61745c95a4 | |||
| 164cf6900f | |||
| 89ab0afaf5 | |||
| a2b84640b1 | |||
| 30723f7862 |
68
.drone.yml
68
.drone.yml
@@ -32,34 +32,48 @@ steps:
|
||||
- ./gradlew assembleRelease
|
||||
- ./gradlew bundleRelease
|
||||
|
||||
- name: deploy latest build
|
||||
image: curlimages/curl
|
||||
environment:
|
||||
SEAFILE_API_KEY:
|
||||
from_secret: SeafileApiKey
|
||||
APK_FILE: app/build/outputs/apk/release/app-release.apk
|
||||
BUNDLE_FILE: app/build/outputs/bundle/release/app-release.aab
|
||||
SEAFILE_REPO: 6debeef9-121e-46ba-acc7-81e109fdcbdd
|
||||
commands:
|
||||
- 'UPLOAD_URL=$(curl -H "Authorization: Token $SEAFILE_API_KEY" https://seafile.zobrist.me/api2/repos/$SEAFILE_REPO/upload-link/ | tr -d "\"")'
|
||||
- echo $UPLOAD_URL
|
||||
- 'curl -H "Authorization: Token $SEAFILE_API_KEY" -F file=@$APK_FILE -F parent_dir=/ -F relative_path=latest/ -F replace=1 "$UPLOAD_URL"'
|
||||
- 'curl -H "Authorization: Token $SEAFILE_API_KEY" -F file=@$BUNDLE_FILE -F parent_dir=/ -F relative_path=latest/ -F replace=1 "$UPLOAD_URL"'
|
||||
- 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: deploy tagged build
|
||||
image: curlimages/curl
|
||||
environment:
|
||||
SEAFILE_API_KEY:
|
||||
from_secret: SeafileApiKey
|
||||
APK_FILE: app/build/outputs/apk/release/app-release.apk
|
||||
BUNDLE_FILE: app/build/outputs/bundle/release/app-release.aab
|
||||
SEAFILE_REPO: 6debeef9-121e-46ba-acc7-81e109fdcbdd
|
||||
commands:
|
||||
- 'UPLOAD_URL=$(curl -H "Authorization: Token $SEAFILE_API_KEY" https://seafile.zobrist.me/api2/repos/$SEAFILE_REPO/upload-link/ | tr -d "\"")'
|
||||
- 'curl -H "Authorization: Token $SEAFILE_API_KEY" -F file=@$APK_FILE -F parent_dir=/ -F relative_path=tagged/$DRONE_TAG/ -F replace=1 "$UPLOAD_URL"'
|
||||
- 'curl -H "Authorization: Token $SEAFILE_API_KEY" -F file=@$BUNDLE_FILE -F parent_dir=/ -F relative_path=tagged/$DRONE_TAG/ -F replace=1 "$UPLOAD_URL"'
|
||||
- 'curl -d "operation=rename&newname=app-release$DRONE_TAG.apk" -H "Authorization: Token $SEAFILE_API_KEY" https://seafile.zobrist.me/api2/repos/$SEAFILE_REPO/file/?p=/tagged/$DRONE_TAG/app-release.apk'
|
||||
- 'curl -d "operation=rename&newname=app-release$DRONE_TAG.aab" -H "Authorization: Token $SEAFILE_API_KEY" https://seafile.zobrist.me/api2/repos/$SEAFILE_REPO/file/?p=/tagged/$DRONE_TAG/app-release.aab'
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user