Merge pull request 'feature/Publish_artifacts_directly_to_seafile_#8' (#9) from feature/Publish_artifacts_directly_to_seafile_#8 into develop
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: fabian/TichuCounter#9
This commit was merged in pull request #9.
This commit is contained in:
42
.drone.yml
42
.drone.yml
@@ -33,24 +33,32 @@ steps:
|
|||||||
- ./gradlew bundleRelease
|
- ./gradlew bundleRelease
|
||||||
|
|
||||||
- name: deploy latest build
|
- name: deploy latest build
|
||||||
image: busybox
|
image: curlimages/curl
|
||||||
volumes:
|
environment:
|
||||||
- name: deploy
|
SEAFILE_API_KEY:
|
||||||
path: /tmp/deploy
|
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: daffda8b-5840-4a65-b6d0-73b991facfb6
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p /tmp/deploy/lastBuild
|
- 'UPLOAD_URL=$(curl -H "Authorization: Token $SEAFILE_API_KEY" https://seafile.zobrist.me/api2/repos/$SEAFILE_REPO/upload-link/ | tr -d "\"")'
|
||||||
- cp ./app/build/outputs/apk/release/app-release.apk /tmp/deploy/lastBuild/app-release_latest.apk
|
- 'curl -H "Authorization: Token $SEAFILE_API_KEY" -F file=@$APK_FILE -F parent_dir=/ -F relative_path=latest/ -F replace=1 "$UPLOAD_URL"'
|
||||||
- cp ./app/build/outputs/bundle/release/app-release.aab /tmp/deploy/lastBuild/app-release_latest.aab
|
- 'curl -H "Authorization: Token $SEAFILE_API_KEY" -F file=@$BUNDLE_FILE -F parent_dir=/ -F relative_path=latest/ -F replace=1 "$UPLOAD_URL"'
|
||||||
|
|
||||||
- name: deploy tagged build
|
- name: deploy tagged build
|
||||||
image: busybox
|
image: curlimages/curl
|
||||||
volumes:
|
environment:
|
||||||
- name: deploy
|
SEAFILE_API_KEY:
|
||||||
path: /tmp/deploy
|
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: daffda8b-5840-4a65-b6d0-73b991facfb6
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p /tmp/deploy/tagged/$DRONE_TAG
|
- 'UPLOAD_URL=$(curl -H "Authorization: Token $SEAFILE_API_KEY" https://seafile.zobrist.me/api2/repos/$SEAFILE_REPO/upload-link/ | tr -d "\"")'
|
||||||
- cp ./app/build/outputs/apk/release/app-release.apk /tmp/deploy/tagged/$DRONE_TAG/app-release$DRONE_TAG.apk
|
- '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"'
|
||||||
- cp ./app/build/outputs/bundle/release/app-release.aab /tmp/deploy/tagged/$DRONE_TAG/app-release_$DRONE_TAG.aab
|
- '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'
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
@@ -64,9 +72,3 @@ steps:
|
|||||||
status:
|
status:
|
||||||
- failure
|
- failure
|
||||||
- success
|
- success
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: deploy
|
|
||||||
host:
|
|
||||||
path: /mnt/seafile-sync-cli/TichuCounter
|
|
||||||
Reference in New Issue
Block a user