ci pipeline

This commit is contained in:
Alya Sirko 2022-08-31 13:17:35 +03:00
parent 844269ee4f
commit 8a051da0f2

View file

@ -1,5 +1,21 @@
kind: pipeline
type: exec
name: ci
steps:
- name: build
commands:
- flutter build apk --debug --split-per-abi
- mv build/app/outputs/flutter-apk/*-debug.apk `pwd`
- rename app pro.kherel.selfprivacy *.apk && rename debug "$DRONE_COMMIT" *.apk
- ls *.apk
node:
server: builder
---
kind: pipeline
type: exec
name: release
steps:
@ -10,7 +26,7 @@ steps:
- eval `ssh-agent -s`
- echo "$SSH_PRIVATE_KEY" | ssh-add -
- scp -r `pwd` isolated:/var/lib/builder
- ssh isolated "cd src && flutter build apk --split-per-abi"
- ssh isolated "cd src && flutter build apk --release --split-per-abi"
- scp isolated:/var/lib/builder/src/build/app/outputs/flutter-apk/*-release.apk `pwd`
environment:
SSH_PRIVATE_KEY:
@ -18,8 +34,14 @@ steps:
- name: deploy
commands:
- rename app pro.kherel.selfprivacy *.apk && rename release `git rev-parse --short HEAD` *.apk
- rename app pro.kherel.selfprivacy *.apk && rename release "$DRONE_TAG" *.apk
- ls *.apk
trigger:
ref:
include:
- refs/tags/v.*
node:
server: builder