2022-05-27 19:31:48 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: 'Build firmware'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: 'Update submodules'
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git submodule sync
|
2022-06-26 18:46:17 +00:00
|
|
|
- git -c protocol.version=2 submodule update --init --force --recursive
|
2022-05-27 19:31:48 +00:00
|
|
|
- git submodule foreach git config --local gc.auto 0
|
|
|
|
- git log -1 --format='%H'
|
|
|
|
|
|
|
|
- name: 'Build default fw'
|
|
|
|
image: hfdj/fztools
|
|
|
|
pull: never
|
|
|
|
commands:
|
|
|
|
- export DIST_SUFFIX=${DRONE_TAG}
|
2022-06-26 17:57:29 +00:00
|
|
|
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw
|
|
|
|
- ./fbt --with-updater COMPACT=1 DEBUG=0 updater_package
|
2022-05-27 19:31:48 +00:00
|
|
|
- mkdir artifacts-default
|
2022-06-26 17:57:29 +00:00
|
|
|
- mv dist/f7-C/* artifacts-default/
|
2022-05-27 19:31:48 +00:00
|
|
|
- ls -laS artifacts-default
|
|
|
|
- ls -laS artifacts-default/f7-update-${DRONE_TAG}
|
2022-07-20 18:25:02 +00:00
|
|
|
environment:
|
|
|
|
FBT_TOOLS_CUSTOM_LINK:
|
|
|
|
from_secret: fbt_link
|
2022-05-27 19:31:48 +00:00
|
|
|
|
|
|
|
- name: 'Bundle resources'
|
|
|
|
image: kramos/alpine-zip
|
|
|
|
commands:
|
2022-06-01 23:15:39 +00:00
|
|
|
- mkdir sd-card
|
|
|
|
- mkdir -p sd-card/subghz/assets
|
|
|
|
- mkdir -p sd-card/nfc/assets
|
2022-07-13 16:04:38 +00:00
|
|
|
- mkdir -p sd-card/infrared/assets
|
2022-06-01 23:15:39 +00:00
|
|
|
- cp assets/resources/subghz/assets/universal_rf_map sd-card/subghz/assets/universal_rf_map
|
|
|
|
- cp assets/resources/subghz/assets/setting_user sd-card/subghz/assets/setting_user
|
2022-07-20 18:25:02 +00:00
|
|
|
- cp assets/resources/subghz/assets/keeloq_mfcodes sd-card/subghz/assets/keeloq_mfcodes
|
2022-06-01 23:15:39 +00:00
|
|
|
- cp assets/resources/nfc/assets/mf_classic_dict.nfc sd-card/nfc/assets/mf_classic_dict.nfc
|
2022-07-13 13:52:49 +00:00
|
|
|
- cp assets/resources/infrared/assets/tv.ir sd-card/infrared/assets/tv.ir
|
2022-07-06 16:57:43 +00:00
|
|
|
- cp assets/resources/Manifest sd-card/Manifest
|
2022-06-01 23:15:39 +00:00
|
|
|
- zip -r artifacts-default/sd-card-${DRONE_TAG}.zip sd-card
|
|
|
|
- rm -rf sd-card
|
2022-05-27 19:31:48 +00:00
|
|
|
- ls -laS artifacts-default
|
|
|
|
|
|
|
|
- name: 'Bundle self-update packages'
|
|
|
|
image: kramos/alpine-zip
|
|
|
|
commands:
|
|
|
|
- tar czpf artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz -C artifacts-default f7-update-${DRONE_TAG}
|
|
|
|
- zip -r artifacts-default/flipper-z-f7-update-${DRONE_TAG}.zip artifacts-default/f7-update-${DRONE_TAG}
|
|
|
|
- rm -rf artifacts-default/f7-update-${DRONE_TAG}
|
|
|
|
- ls -laS artifacts-default
|
|
|
|
|
|
|
|
- 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
|
|
|
|
- artifacts-default/flipper-z-f7-full-${DRONE_TAG}.dfu
|
|
|
|
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-07-03 23:18:53 +00:00
|
|
|
[-Github-](https://github.com/Eng1n33r/flipperzero-firmware/releases/tag/${DRONE_TAG})"
|
2022-05-27 19:31:48 +00:00
|
|
|
document:
|
|
|
|
- artifacts-default/flipper-z-f7-full-${DRONE_TAG}.dfu
|
|
|
|
- artifacts-default/flipper-z-f7-update-${DRONE_TAG}.zip
|
2022-06-01 23:15:39 +00:00
|
|
|
- artifacts-default/sd-card-${DRONE_TAG}.zip
|
2022-05-27 19:31:48 +00:00
|
|
|
|
|
|
|
- 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-06-06 14:33:18 +00:00
|
|
|
[[Github]](https://github.com/Eng1n33r/flipperzero-firmware/releases/latest)"
|
2022-05-27 19:31:48 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
node:
|
|
|
|
typ: haupt
|