unleashed-firmware/.drone.yml
2022-05-27 22:31:48 +03:00

107 lines
No EOL
2.7 KiB
YAML

kind: pipeline
type: docker
name: 'Build firmware'
steps:
- name: 'Update submodules'
image: alpine/git
commands:
- git submodule sync
- git -c protocol.version=2 submodule update --init --force
- git submodule foreach git config --local gc.auto 0
- git log -1 --format='%H'
- name: 'Rebuild Assets'
image: hfdj/fztools
pull: never
commands:
- export DIST_SUFFIX=${DRONE_TAG}
- export WORKFLOW_BRANCH_OR_TAG=${DRONE_TAG}
- make assets_rebuild assets_manifest
- name: 'Build default fw'
image: hfdj/fztools
pull: never
commands:
- export DIST_SUFFIX=${DRONE_TAG}
- export WORKFLOW_BRANCH_OR_TAG=${DRONE_TAG}
- make updater_package TARGET=f7 DEBUG=0 COMPACT=1
- mkdir artifacts-default
- mv dist/f7/* artifacts-default/
- ls -laS artifacts-default
- ls -laS artifacts-default/f7-update-${DRONE_TAG}
- name: 'Bundle resources'
image: kramos/alpine-zip
commands:
- tar czpf artifacts-default/flipper-z-any-resources-${DRONE_TAG}.tgz -C assets resources
- 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}}
[-Github-](https://github.com/Eng1n33r/flipperzero-firmware/releases/tag/{{build.tag}})"
document:
- artifacts-default/flipper-z-f7-full-${DRONE_TAG}.dfu
- artifacts-default/flipper-z-f7-update-${DRONE_TAG}.zip
- 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}}
[[Github]](https://github.com/Eng1n33r/flipperzero-firmware/releases/tag/{{build.tag}})"
trigger:
event:
- tag
node:
typ: haupt