Update circle CI config # 8

pull/393/head
connor rigby 2018-01-03 10:56:52 -08:00 committed by Connor Rigby
parent 0ee0ddc54a
commit 8ee515831a
1 changed files with 26 additions and 0 deletions

View File

@ -68,6 +68,27 @@ jobs:
- ~/.nerves
- run:
command: mix firmware.slack --channels C58DCU4A3
- run:
command: fwup --sign --private-key $NERVES_FW_PRIV_KEY -i _build/{{ .Environment.MIX_TARGET }}/{{ .Environment.MIX_ENV }}/nerves/images/farmbot.fw -o farmbot-v{{ .Environment.Revision }}.fw
- save_cache:
key: v3-firmware-{{ .Revision }}-{{ .Environment.CIRCLE_TAG }}
paths:
- farmbot-v{{ .Environment.Revision }}.fw
deploy_firmware:
<<: *defaults
steps:
- run:
name: Install dependencies
command: |
wget https://github.com/tcnksm/ghr/releases/download/v0.5.4/ghr_v0.5.4_linux_amd64.zip
unzip ghr_v0.5.4_linux_amd64.zip
- run:
command: grep -Pazo "(?s)(?<=## ${CIRCLE_TAG})[^#]+" CHANGELOG.md > RELEASE_NOTES
- restore_cache:
key: v3-firmware-{{ .Revision }}-{{ .Environment.CIRCLE_TAG }}
- run:
command: ./ghr -draft -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -b "$(cat RELEASE_NOTES)" -replace $CIRCLE_TAG farmbot-v{{ .Environment.Revision }}.fw
workflows:
version: 2
@ -91,3 +112,8 @@ workflows:
filters:
branches:
only: nightly
- deploy_firmware:
context: org-global
filters:
branches:
only: nightly