File tree Expand file tree Collapse file tree 2 files changed +53
-8
lines changed Expand file tree Collapse file tree 2 files changed +53
-8
lines changed Original file line number Diff line number Diff line change
1
+ # # This is triggered by the publishing of a release, and will build the assets and attach them.
2
+
3
+ name : On Release
4
+
5
+ on :
6
+ release :
7
+ types : [published]
8
+
9
+ jobs :
10
+ ci :
11
+ name : CI
12
+ uses : ./.github/workflows/ci.yml
13
+ with :
14
+ debug_build : false
15
+
16
+ release :
17
+ name : Attach Release Artifacts
18
+ needs : ci
19
+ runs-on : ubuntu-22.04
20
+ steps :
21
+ - name : Code Checkout
22
+ uses : actions/checkout@v2
23
+
24
+ - name : Fetch build artifacts
25
+ uses : actions/download-artifact@v2
26
+
27
+ - name : List assets
28
+ run : ls -al Betaflight-*/*
29
+
30
+ - name : Attach assets to release
31
+ run : |
32
+ set -x
33
+ assets=()
34
+ for asset in Betaflight-*/*; do
35
+ assets+=("-a" "$asset")
36
+ echo "$asset"
37
+ done
38
+ tag_name="${GITHUB_REF##*/}"
39
+ hub release edit "${assets[@]}" -m "" "$tag_name"
40
+ env :
41
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
1
# Builds Betaflight Blackbox Explorer on Windows, Linux and macOS platforms.
2
2
#
3
- # After building, artifacts are released to a separate repository.
4
-
5
- env :
6
- debugBuild : true
3
+ # After building, artifacts are released to a seperate repository.
7
4
8
5
name : CI
9
6
10
- on : workflow_call
7
+ on :
8
+ workflow_call :
9
+ inputs :
10
+ debug_build :
11
+ description : ' Specifies if it is a debug build or a release build'
12
+ default : true
13
+ required : false
14
+ type : boolean
11
15
12
16
jobs :
13
17
build :
@@ -45,14 +49,14 @@ jobs:
45
49
- run : yarn install --immutable --immutable-cache --check-cache
46
50
47
51
- run : yarn gulp release ${{ matrix.releaseArgs }}
48
- if : ${{ !env.debugBuild }}
52
+ if : ${{ !inputs.debug_build }}
49
53
50
54
- run : yarn gulp debug-release ${{ matrix.releaseArgs }}
51
- if : ${{ env.debugBuild }}
55
+ if : ${{ inputs.debug_build }}
52
56
53
57
- name : Publish build artifacts
54
58
uses : actions/upload-artifact@v2
55
59
with :
56
- name : Betaflight-Blackbox-Explorer${{ env.debugBuild == 'true' && '-Debug' || '' }}-${{ matrix.name }}
60
+ name : Betaflight-Blackbox-Explorer${{ inputs.debug_build == 'true' && '-Debug' || '' }}-${{ matrix.name }}
57
61
path : release/
58
62
retention-days : 90
You can’t perform that action at this time.
0 commit comments