forked from betaflight/betaflight-configurator
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 937 Bytes
/
build-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## This is triggered by the publishing of a release, and will build the assets and attach them.
name: On Release
on:
release:
types: [published]
jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
with:
debug_build: false
release:
name: Attach Release Artifacts
needs: ci
runs-on: ubuntu-22.04
steps:
- name: Code Checkout
uses: actions/checkout@v2
- name: Fetch build artifacts
uses: actions/download-artifact@v2
- name: List assets
run: ls -al Betaflight-*/*
- name: Attach assets to release
run: |
set -x
assets=()
for asset in Betaflight-*/*; do
assets+=("-a" "$asset")
echo "$asset"
done
tag_name="${GITHUB_REF##*/}"
hub release edit "${assets[@]}" -m "" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}