diff --git a/.drone.yml b/.drone.yml
deleted file mode 100644
index e00ad6cd..00000000
--- a/.drone.yml
+++ /dev/null
@@ -1,104 +0,0 @@
----
-kind: pipeline
-type: docker
-name: tests
-
-steps:
-
- - name: unit-tests
- image: nextcloudci/android:android-49
- depends_on: [ clone ]
- commands:
- - ./gradlew test
-
- - name: check-formatting
- image: zosiab/eclint:latest
- depends_on: [ clone ]
- commands:
- - git pull origin main
- - eclint check $(git diff --name-only origin/main)
-
- # This may be used in the future, because it makes of intellij's native code inspection/formatting capabilities.
- # Additional information: https://www.jetbrains.com/help/idea/command-line-formatter.html
- #
- # - name: do-or-check-formatting
- # image: dlsniper/docker-intellij
- # depends_on: [ clone ]
- # commands:
- # - /opt/intellij/bin/idea.sh inspect/format ...
- #
- # - name: do-or-check-formatting
- # image: dlsniper/docker-intellij
- # depends_on: [ clone ]
- # commands:
- # - /opt/intellij/bin/idea.sh format -s .idea/codeStyles/Project.xml -m *.java app/src/main/java
-
-trigger:
- event:
- - pull_request
-
----
-kind: pipeline
-type: docker
-name: code-analysis
-
-steps:
-
- - name: check-global-formatting
- image: zosiab/eclint:latest
- depends_on: [ clone ]
- commands:
- - eclint check $(git ls-files)
-
-trigger:
- event:
- - push
- branch:
- - main
-
----
-kind: pipeline
-type: docker
-name: build
-
-steps:
-
- - name: build
- image: nextcloudci/android:android-49
- commands:
- - ./gradlew assembleFreeRelease
-
- - name: sign
- image: nextcloudci/android:android-49
- environment:
- BOT_TOKEN:
- from_secret: BOT_TOKEN
- KS_PASS:
- from_secret: KS_PASS
- KEY_PASS:
- from_secret: KEY_PASS
- OUTPUT: signed.apk
- INSTANCE: https://codeberg.org
- KS_FILE: ci_keystore.jks
- KS_REPO:
- from_secret: KS_REPO
- commands:
- - ./scripts/sign-build.sh
-
- - name: publish
- image: vividboarder/drone-webdav
- environment:
- WEBDAV_USERNAME: GitNexBot
- WEBDAV_PASSWORD:
- from_secret: NC_TOKEN
- PLUGIN_FILE: 'signed.apk'
- PLUGIN_TIMEOUT: 180
- PLUGIN_ATTEMPTS: 5
- PLUGIN_DESTINATION: 'https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/builds/latest.apk'
- PLUGIN_CUSTOM_ARGUMENTS: '--progress-bar'
-
-trigger:
- event:
- - push
- branch:
- - main
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index 4f0e6737..00000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,116 +0,0 @@
-stages:
- - build
- - sign
- - publish
- - locales
-
-on_setup:
- image: curlimages/curl:7.77.0
- stage: .pre
- only:
- - main
- - tags
- variables:
- INSTANCE: "https://codeberg.org"
- MAIN_REPO: gitnex/GitNex
- STATE: pending
- script:
- - ./scripts/add-commit-status.sh
-
-build:
- image: alvrme/alpine-android:android-31-jdk11
- stage: build
- only:
- - main
- - tags
- script:
- - ./gradlew assembleFreeRelease
- artifacts:
- paths:
- - app/build/outputs/
- expire_in: 15 minutes
-
-sign:
- image: alvrme/alpine-android:android-31-jdk11
- stage: sign
- only:
- - main
- - tags
- variables:
- OUTPUT: "signed.apk"
- INSTANCE: "https://codeberg.org"
- KS_FILE: "ci_keystore.jks"
- script:
- - ./scripts/sign-build.sh
- artifacts:
- paths:
- - signed.apk
- expire_in: 15 minutes
-
-latest:
- image: curlimages/curl:7.77.0
- stage: publish
- only:
- - main
- - tags
- variables:
- WEBDAV_USERNAME: "GitNexBot"
- PLUGIN_FILE: "signed.apk"
- PLUGIN_DESTINATION: "https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/builds/latest.apk"
- script:
- - curl -T "$PLUGIN_FILE" -u "$WEBDAV_USERNAME":"$WEBDAV_PASSWORD" "$PLUGIN_DESTINATION"
-
-release:
- image: curlimages/curl:7.77.0
- stage: publish
- only:
- - tags
- variables:
- WEBDAV_USERNAME: "GitNexBot"
- PLUGIN_FILE: "signed.apk"
- script:
- - "[[ $CI_COMMIT_REF_NAME == *'-rc'* ]] && echo 'Upload blocked. Build seems to be a release candidate.' && exit 0"
- - curl -T "$PLUGIN_FILE" -u "$WEBDAV_USERNAME":"$WEBDAV_PASSWORD" 'https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/releases/'"$CI_COMMIT_REF_NAME"'.apk'
-
-push_translations:
- image: crowdin/cli:3.7.8
- stage: locales
- only:
- refs:
- - main
- changes:
- - app/src/main/res/values/strings.xml
- script:
- - echo "Set up Crowdin CLI"
- - cp crowdin.example.yml crowdin.yml
- - sed -i 's/-removed-/'"$CROWDIN_TOKEN"'/' crowdin.yml
- - echo "Push translations"
- - crowdin push
-
-on_success:
- image: curlimages/curl:7.77.0
- stage: .post
- only:
- - main
- - tags
- variables:
- INSTANCE: "https://codeberg.org"
- MAIN_REPO: gitnex/GitNex
- STATE: success
- script:
- - ./scripts/add-commit-status.sh
- when: on_success
-
-on_failure:
- image: curlimages/curl:7.77.0
- stage: .post
- only:
- - main
- - tags
- variables:
- INSTANCE: "https://codeberg.org"
- MAIN_REPO: gitnex/GitNex
- STATE: failure
- script:
- - ./scripts/add-commit-status.sh
- when: on_failure
diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml
new file mode 100644
index 00000000..5b24fd3a
--- /dev/null
+++ b/.woodpecker/build.yml
@@ -0,0 +1,52 @@
+pipeline:
+ build:
+ image: alvrme/alpine-android:android-31-jdk11
+ commands:
+ - ./gradlew assembleFreeRelease
+ when:
+ path: [ app/, build.gradle ]
+
+ sign:
+ image: alvrme/alpine-android:android-31-jdk11
+ environment:
+ OUTPUT: "signed.apk"
+ INSTANCE: "https://codeberg.org"
+ KS_FILE: "gitnex_ci_keystore.jks"
+ commands:
+ - >
+ KEYFILE=$(mktemp)
+ curl -X GET "${INSTANCE}/api/v1/repos/${KS_REPO}/contents/${KS_FILE}?token=${BOT_TOKEN}" -H "accept: application/json" | sed 's|"content":"|#|g' | cut -d '#' -f 2 | cut -d '"' -f 1 | base64 -d > ${KEYFILE}
+ apksigner sign -v --ks-pass pass:$KS_PASS --key-pass pass:$KEY_PASS --ks-key-alias GitNexBot --ks ${KEYFILE} --out signed.apk $(find . -name "*release*.apk")
+ secrets: [ BOT_TOKEN, KS_PASS, KEY_PASS, KS_REPO ]
+ when:
+ event: [ push, tag ]
+ branch: main
+ path: [ app/, build.gradle ]
+
+ upload:
+ image: curlimages/curl:7.82.0
+ group: upload
+ environment:
+ WEBDAV_USERNAME: "GitNexBot"
+ PLUGIN_FILE: "signed.apk"
+ PLUGIN_DESTINATION: "https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/builds/latest.apk"
+ commands:
+ - curl -T "$PLUGIN_FILE" -u "$WEBDAV_USERNAME":"$WEBDAV_PASSWORD" "$PLUGIN_DESTINATION"
+ secrets: [ WEBDAV_PASSWORD ]
+ when:
+ event: [ push, tag ]
+ branch: main
+ path: [ app/, build.gradle ]
+
+ upload-release:
+ image: curlimages/curl:7.82.0
+ group: upload
+ environment:
+ WEBDAV_USERNAME: "GitNexBot"
+ PLUGIN_FILE: "signed.apk"
+ commands:
+ - "[[ $CI_COMMIT_TAG == *'-rc'* ]] && echo 'Upload blocked. Build seems to be a release candidate.' && exit 0"
+ - curl -T "$PLUGIN_FILE" -u "$WEBDAV_USERNAME":"$WEBDAV_PASSWORD" 'https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/releases/'"$CI_COMMIT_TAG"'.apk'
+ secrets: [ WEBDAV_PASSWORD ]
+ when:
+ event: [ tag ]
\ No newline at end of file
diff --git a/.woodpecker/locale.yml b/.woodpecker/locale.yml
new file mode 100644
index 00000000..9cee698d
--- /dev/null
+++ b/.woodpecker/locale.yml
@@ -0,0 +1,12 @@
+pipeline:
+ push:
+ image: crowdin/cli:3.7.8
+ commands:
+ - cp crowdin.example.yml crowdin.yml
+ - sed -i 's/-removed-/'"$CROWDIN_TOKEN"'/' crowdin.yml
+ - crowdin push
+ secrets: [ CROWDIN_TOKEN ]
+ when:
+ event: [ push, tag ]
+ branch: main
+ path: [ app/src/main/res/values/strings.xml ]
diff --git a/README.md b/README.md
index cc2277cf..0f24708e 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[![License: GPL v3](https://codeberg.org/gitnex/GitNex/raw/branch/main/assets/license.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Pipeline status](https://img.shields.io/gitlab/pipeline/mmarif4u/gitnex-ci/main)](https://gitlab.com/mmarif4u/gitnex-ci/-/pipelines) [![Release](https://img.shields.io/badge/dynamic/json.svg?label=release&url=https://codeberg.org/api/v1/repos/gitnex/GitNex/releases&query=$[0].tag_name)](https://codeberg.org/gitnex/GitNex/releases) [![Crowdin](https://badges.crowdin.net/gitnex/localized.svg)](https://crowdin.com/project/gitnex) [![Join the Discord chat at https://discord.gg/FbSS4rf](https://img.shields.io/discord/632219664587685908.svg)](https://discord.gg/FbSS4rf)
+[![License: GPL v3](https://codeberg.org/gitnex/GitNex/raw/branch/main/assets/license.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Pipeline status](https://ci.codeberg.org/api/badges/gitnex/GitNex/status.svg)](https://ci.codeberg.org/gitnex/GitNex) [![Release](https://img.shields.io/badge/dynamic/json.svg?label=release&url=https://codeberg.org/api/v1/repos/gitnex/GitNex/releases&query=$[0].tag_name)](https://codeberg.org/gitnex/GitNex/releases) [![Crowdin](https://badges.crowdin.net/gitnex/localized.svg)](https://crowdin.com/project/gitnex) [![Join the Discord chat at https://discord.gg/FbSS4rf](https://img.shields.io/discord/632219664587685908.svg)](https://discord.gg/FbSS4rf)
[](https://www.patreon.com/mmarif) [](https://www.buymeacoffee.com/mmarif)
diff --git a/scripts/add-commit-status.sh b/scripts/add-commit-status.sh
deleted file mode 100755
index cc4988bd..00000000
--- a/scripts/add-commit-status.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# Environment variables which have to be set in order for this to work properly
-# @author opyale
-#
-# INSTANCE (e.g. https://codeberg.org)
-# MAIN_REPO (e.g. gitnex/GitNex)
-# STATE (e.g. pending, success, error, failure or warning)
-# CI_COMMIT_SHA; BOT_TOKEN
-
-context="GitLab CI"
-description="GitLab continuous integration tool"
-state=$STATE
-target_url=$CI_PIPELINE_URL
-
-body='
-{
-"context": "'$context'",
-"description": "'$description'",
-"state": "'$state'",
-"target_url": "'$target_url'"
-}
-'
-
-curl --request POST \
---data "$body" \
---header "Accept: application/json" \
---header "Content-Type: application/json" \
-"${INSTANCE}/api/v1/repos/${MAIN_REPO}/statuses/${CI_COMMIT_SHA}?token=${BOT_TOKEN}"
diff --git a/scripts/sign-build.sh b/scripts/sign-build.sh
deleted file mode 100755
index 8d94ae9e..00000000
--- a/scripts/sign-build.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-# Make sure needed var's are here
-[ -z "${BOT_TOKEN}" ] && { echo "Token is missing (BOT_TOKEN)"; exit 1; }
-[ -z "${KS_PASS}" ] && { echo "Missing keystore password (KS_PASS)"; exit 1; }
-[ -z "${KEY_PASS}" ] && { echo "Missing KEY_PASS"; exit 1; }
-[ -z "${INSTANCE}" ] && { echo "Instance url is missing (INSTANCE)"; exit 1; }
-[ -z "${KS_REPO}" ] && { echo "Missing repo of keystore (KS_REPO)"; exit 1; }
-[ -z "${KS_FILE}" ] && { echo "Filename of keystore is missing (KS_FILE)"; exit 1; }
-[ -z "${OUTPUT}" ] && { echo "Missing filename of signed output (OUTPUT)"; exit 1; }
-
-KEYFILE=$(mktemp)
-curl -X GET "${INSTANCE}/api/v1/repos/${KS_REPO}/contents/${KS_FILE}?token=${BOT_TOKEN}" -H "accept: application/json" | sed 's|"content":"|#|g' | cut -d '#' -f 2 | cut -d '"' -f 1 | base64 -d > ${KEYFILE}
-
-apksigner sign -v --ks-pass pass:$KS_PASS --key-pass pass:$KEY_PASS --ks-key-alias GitNexBot --ks ${KEYFILE} --out signed.apk $(find . -name "*release*.apk")