unleashed-firmware/.drone.yml

170 lines
5.7 KiB
YAML
Raw Normal View History

2022-05-27 22:31:48 +03:00
kind: pipeline
type: docker
name: "Build firmware"
2022-05-27 22:31:48 +03:00
steps:
- name: "Update submodules"
image: alpine/git
commands:
- git submodule sync
- git -c protocol.version=2 submodule update --init --force --recursive
- git submodule foreach git config --local gc.auto 0
- git log -1 --format='%H'
2022-11-12 22:24:22 +03:00
- name: "Build default FW"
image: hfdj/fztools
pull: never
commands:
- export DIST_SUFFIX=${DRONE_TAG}
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw
2022-08-03 00:32:55 +03:00
- ./fbt COMPACT=1 DEBUG=0 updater_package
- mkdir artifacts-default
- mv dist/f7-C/* artifacts-default/
- ls -laS artifacts-default
- ls -laS artifacts-default/f7-update-${DRONE_TAG}
2022-08-01 23:20:04 +03:00
- sed -i 's/(version)/'${DRONE_TAG}'/g' CHANGELOG.md
2022-10-24 17:15:38 +03:00
- echo '# [Install via Web Updater](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-'${DRONE_TAG}'.tgz&channel=dev-cfw&version='${DRONE_TAG}')' >> CHANGELOG.md
environment:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link
2022-11-12 22:24:22 +03:00
- name: "Build no anims FW"
image: hfdj/fztools
pull: never
commands:
- rm -f assets/dolphin/external/manifest.txt
- cp .ci_files/anims_ofw.txt assets/dolphin/external/manifest.txt
- export DIST_SUFFIX=${DRONE_TAG}
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw
- ./fbt COMPACT=1 DEBUG=0 updater_package
- mkdir artifacts-ofw-anims
- mv dist/f7-C/* artifacts-ofw-anims/
- ls -laS artifacts-ofw-anims
- ls -laS artifacts-ofw-anims/f7-update-${DRONE_TAG}
- echo '' >> CHANGELOG.md
2022-11-13 01:14:06 +03:00
- echo '### [Version without custom animations - Install via Web Updater](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-noanims-'${DRONE_TAG}'.tgz&channel=dev-cfw&version='${DRONE_TAG}')' >> CHANGELOG.md
2022-11-12 22:24:22 +03:00
environment:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link
- name: "Bundle self-update packages"
image: kramos/alpine-zip
commands:
2022-11-12 22:24:22 +03:00
- mv artifacts-ofw-anims/flipper-z-f7-update-${DRONE_TAG}.tgz artifacts-ofw-anims/flipper-z-f7-update-noanims-${DRONE_TAG}.tgz
- cp artifacts-ofw-anims/flipper-z-f7-update-noanims-${DRONE_TAG}.tgz .
2022-08-01 23:56:25 +03:00
- cp artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz .
2022-11-12 22:24:22 +03:00
- zip -r artifacts-ofw-anims/flipper-z-f7-update-noanims-${DRONE_TAG}.zip artifacts-ofw-anims/f7-update-${DRONE_TAG}
- zip -r artifacts-default/flipper-z-f7-update-${DRONE_TAG}.zip artifacts-default/f7-update-${DRONE_TAG}
2022-11-12 22:24:22 +03:00
- rm -rf artifacts-ofw-anims/f7-update-${DRONE_TAG}
- rm -rf artifacts-default/f7-update-${DRONE_TAG}
2022-11-12 22:24:22 +03:00
- ls -laS artifacts-ofw-anims
- ls -laS artifacts-default
2022-11-12 22:24:22 +03:00
- name: "Upload default to updates srv"
2022-08-01 23:20:04 +03:00
image: appleboy/drone-scp
settings:
host:
from_secret: dep_host
username:
from_secret: dep_user
password:
from_secret: dep_passwd
port:
from_secret: dep_port
target:
from_secret: dep_target
2022-08-01 23:56:25 +03:00
source: flipper-z-f7-update-${DRONE_TAG}.tgz
2022-08-01 23:20:04 +03:00
2022-11-12 22:24:22 +03:00
- name: "Upload no-anims to updates srv"
image: appleboy/drone-scp
settings:
host:
from_secret: dep_host
username:
from_secret: dep_user
password:
from_secret: dep_passwd
port:
from_secret: dep_port
target:
from_secret: dep_target
source: flipper-z-f7-update-noanims-${DRONE_TAG}.tgz
- name: "Do Github release"
image: ddplugins/github-release
pull: never
settings:
github_url: https://github.com
repo_owner:
from_secret: github_repoowner
api_key:
from_secret: github_apikey
files:
- artifacts-default/*.tgz
- artifacts-default/*.zip
2022-11-12 22:24:22 +03:00
- artifacts-ofw-anims/*.tgz
title: ${DRONE_TAG}
note: CHANGELOG.md
checksum:
- md5
- sha1
- crc32
- name: "Send files to telegram"
image: appleboy/drone-telegram
settings:
token:
from_secret: tgtoken
to:
from_secret: tgid
format: markdown
message: "New Unleashed firmware released!
Version: {{build.tag}}
2022-10-09 02:27:38 +03:00
[-Github-](https://github.com/DarkFlippers/unleashed-firmware/releases/tag/${DRONE_TAG})
2022-08-03 00:32:55 +03:00
2022-10-29 02:53:11 +03:00
2022-10-22 23:20:17 +03:00
[-How to install firmware-](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToInstall.md)
2022-08-03 00:32:55 +03:00
2022-10-29 02:53:11 +03:00
2022-11-13 01:14:06 +03:00
[-Version without custom animations - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-noanims-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})
2022-10-29 02:53:11 +03:00
2022-10-24 17:15:38 +03:00
[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})"
document:
- artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz
- name: "Send discord notification"
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: ds_wh_id
webhook_token:
from_secret: ds_wh_token
message: "New Unleashed firmware released!
Version: {{build.tag}}
2022-10-09 02:27:38 +03:00
[[Github]](https://github.com/DarkFlippers/unleashed-firmware/releases/tag/${DRONE_TAG})
2022-08-03 00:32:55 +03:00
2022-11-13 01:14:06 +03:00
[-How to install firmware-](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToInstall.md)
[-Version without custom animations - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-noanims-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})
2022-10-24 17:15:38 +03:00
[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})"
2022-05-27 22:31:48 +03:00
trigger:
event:
- tag
2022-05-27 22:31:48 +03:00
node:
typ: haupt