selfprivacy.org.app/.drone.yml

140 lines
3.1 KiB
YAML
Raw Normal View History

2022-09-10 13:52:54 +00:00
kind: pipeline
type: exec
name: Continuous Integration
steps:
2022-09-10 13:55:24 +00:00
- name: Prepare
commands:
- ln -s /var/lib/drone-runner-exec/.local $HOME/.local
2022-09-14 13:21:46 +00:00
- name: Run Tests
2022-09-10 13:52:54 +00:00
commands:
2022-09-14 13:21:46 +00:00
- ./ci.py --ci-run-tests
- name: Build Linux Target
commands:
- ./ci.py --ci-build-linux
- name: Build APK Target
commands:
- ./ci.py --ci-build-apk
2022-09-10 13:52:54 +00:00
trigger:
event:
- push
- pull_request
node:
server: builder
---
2022-09-09 13:58:08 +00:00
kind: pipeline
type: exec
2022-09-09 13:58:08 +00:00
name: Release
2022-09-09 11:25:08 +00:00
2022-08-31 10:17:35 +00:00
steps:
2022-09-09 14:37:04 +00:00
- name: Prepare
commands:
- ln -s /var/lib/drone-runner-exec/.local $HOME/.local
2022-09-14 13:21:46 +00:00
- if podman volume exists release; then podman volume rm -f release; podman volume create release; else podman volume create release; fi
- git config user.email "builder@selfprivacy.org"
- git config user.name "Builder"
2022-09-09 14:37:04 +00:00
- name: Build Intermediate Linux Release Artifact (Binary)
2022-09-09 13:58:08 +00:00
commands:
2022-09-10 00:15:26 +00:00
- ./ci.py --build-linux
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
2022-09-09 13:58:08 +00:00
- name: Build Intermediate Android Release Artifact (.APK)
2022-09-09 13:58:08 +00:00
commands:
2022-09-10 00:15:26 +00:00
- ./ci.py --build-apk
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
2022-09-09 13:58:08 +00:00
- name: Sign Android Release Artifact (.APK) for Standalone Use
commands:
2022-09-10 00:15:26 +00:00
- ./ci.py --sign-apk-standalone
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
2022-09-09 13:58:08 +00:00
- name: Sign Android Release Artifact (.APK) for F-Droid Repository
commands:
2022-09-10 00:15:26 +00:00
- ./ci.py --sign-apk-fdroid
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
2022-09-09 13:58:08 +00:00
- name: Package Linux AppImage Artifact
commands:
2022-09-10 00:15:26 +00:00
- ./ci.py --package-linux-appimage
2022-09-09 15:28:17 +00:00
- name: Package Linux Flatpak Artifact
commands:
2022-09-10 00:15:26 +00:00
- ./ci.py --package-linux-flatpak
2022-09-09 15:28:17 +00:00
- name: Package Linux Archive Artifact
commands:
2022-09-10 00:15:26 +00:00
- ./ci.py --package-linux-archive
2022-08-31 10:17:35 +00:00
2022-09-14 13:21:46 +00:00
- name: Push Artifacts to the Release Volume
commands:
- git add -v *.AppImage *.flatpak *.apk *.apk.idsig *.tar.zstd
- git commit -m Release
- git archive --format=tar HEAD | podman volume import release -
2022-08-31 11:55:54 +00:00
trigger:
event:
2022-09-09 13:58:08 +00:00
- tag
2022-08-31 11:55:54 +00:00
2022-08-31 10:17:35 +00:00
node:
server: builder
2022-09-10 01:07:58 +00:00
---
kind: pipeline
type: exec
name: Deploy
steps:
- name: Prepare
commands:
2022-09-10 01:22:20 +00:00
- ln -s /var/lib/drone-runner-exec/.local $HOME/.local
2022-09-14 13:21:46 +00:00
- podman unshare podman volume mount release
2022-09-10 01:07:58 +00:00
- name: Create Release and Deploy Artifacts
commands:
2022-09-14 13:21:46 +00:00
- ./ci.py --deploy-gitea-release
2022-09-10 01:07:58 +00:00
environment:
GITEA_RELEASE_TOKEN:
from_secret: GITEA_RELEASE_TOKEN
- name: Deploy F-Droid Repo
commands:
2022-09-14 13:21:46 +00:00
- ./ci.py --deploy-fdroid-repo
2022-09-10 01:07:58 +00:00
environment:
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY
trigger:
event:
- tag
node:
server: builder
depends_on:
- Release