selfprivacy.org.app/.drone.yml
2022-08-31 15:45:02 +03:00

59 lines
1.2 KiB
YAML

kind: pipeline
type: exec
name: Continuous Integration
steps:
- name: Build Debug Artifacts
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
trigger:
event:
- push
- pull_request
node:
server: builder
---
kind: pipeline
type: exec
name: Release
steps:
- name: Prepare for Build
commands:
- nixos-container stop isolated
- nixos-container start isolated
- eval `ssh-agent -s`
- echo "$SSH_PRIVATE_KEY" | ssh-add -
environment:
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY
- name: Build Release Artifacts
commands:
- scp -r `pwd` isolated:/var/lib/builder
- 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`
- name: Prepare for Deploy
commands:
- rename app pro.kherel.selfprivacy *.apk && rename release "$DRONE_SEMVER" *.apk
- ls *.apk
- name: Deploy on F-Droid Repository
commands:
- ls *.apk
trigger:
event:
- tag
node:
server: builder