ReaderForSelfoss-multiplatform/.drone.yml

85 lines
2.2 KiB
YAML
Raw Normal View History

2022-07-23 20:28:06 +00:00
kind: pipeline
type: docker
2022-09-14 04:53:37 +00:00
name: test
2022-09-13 19:52:23 +00:00
steps:
2022-09-14 08:25:59 +00:00
- name: createTag
image: ubuntu:latest
2022-09-14 04:53:37 +00:00
commands:
2022-09-14 08:25:59 +00:00
- echo "toto"
2022-09-14 06:49:42 +00:00
trigger:
event:
- push
- pull_request
2022-09-14 04:53:37 +00:00
---
kind: pipeline
type: docker
name: Publish
steps:
- name: createTag
2022-09-14 06:49:42 +00:00
image: ubuntu:latest
2022-09-14 04:53:37 +00:00
commands:
2022-09-14 08:17:19 +00:00
- apt-get update && apt-get install -y git
2022-09-14 08:24:43 +00:00
- ./build.sh --publish --from-ci
2022-09-14 04:53:37 +00:00
2022-09-14 08:38:03 +00:00
- name: git-push
image: appleboy/drone-git-push
settings:
2022-09-14 08:49:12 +00:00
remote: git@gitea.amine-louveau.fr:Louvorg/ReaderForSelfoss-multiplatform.git
2022-09-14 08:38:03 +00:00
followtags: true
ssh_key:
from_secret: giteaKey
- name: scpFiles
image: appleboy/drone-scp
settings:
host: amine-louveau.fr
username: ubuntu
key:
from_secret: privateKey
port: 22
target: /home/ubuntu/
source: version.txt
2022-09-14 04:53:37 +00:00
trigger:
event:
- promote
target:
- production
---
kind: pipeline
type: docker
name: Release
2022-09-13 20:11:35 +00:00
2022-09-14 04:53:37 +00:00
steps:
- name: build
2022-09-13 19:52:23 +00:00
image: mingc/android-build-box:latest
commands:
2022-09-13 19:56:24 +00:00
- ./gradlew :androidApp:assembleGithubConfigRelease -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" -P pushCache=false
2022-09-14 04:53:37 +00:00
- name: sign
image: mingc/android-build-box:latest
commands:
2022-09-13 19:19:45 +00:00
- wget https://amine-louveau.fr/key
2022-09-13 20:11:35 +00:00
- $ANDROID_HOME/build-tools/31.0.0/zipalign -f -v 4 androidApp/build/outputs/apk/githubConfig/release/androidApp-githubConfig-release-unsigned.apk androidApp/build/outputs/apk/githubConfig/release/android-prod-released-ziped.apk
2022-09-13 20:20:10 +00:00
- $ANDROID_HOME/build-tools/31.0.0/apksigner sign -v --out signed.apk --ks ./key --ks-key-alias $YOUR_KEY_ALIAS --ks-pass pass:$YOUR_KEYSTORE_PASSWORD --v1-signing-enabled true --v2-signing-enabled true androidApp/build/outputs/apk/githubConfig/release/android-prod-released-ziped.apk
2022-09-13 20:11:35 +00:00
- $ANDROID_HOME/build-tools/31.0.0/apksigner verify signed.apk
2022-09-13 18:45:47 +00:00
environment:
YOUR_KEYSTORE_PASSWORD:
2022-09-13 18:59:03 +00:00
from_secret: keyPass
2022-09-13 18:45:47 +00:00
YOUR_KEY_ALIAS:
2022-09-13 18:59:03 +00:00
from_secret: keyAlias
2022-09-13 20:11:35 +00:00
2022-09-14 04:53:37 +00:00
- name: gitea_release
image: plugins/gitea-release
settings:
api_key:
from_secret: giteaAPI
base_url: https://gitea.amine-louveau.fr
files: signed.apk
trigger:
event:
- tag