15
15
matrix :
16
16
firmware : [Main]
17
17
target : [Release]
18
- coin_support : ["BTC_ONLY", "MULTI_COIN"] # Builds both BTC_ONLY and MULTI_COIN variants
18
+ coin_support : ["BTC_ONLY", "MULTI_COIN"]
19
19
uses : ./.github/workflows/containerized-build.yml
20
20
with :
21
21
firmware : ${{ matrix.firmware }}
24
24
secrets : inherit
25
25
26
26
create-release :
27
- needs : build-firmwares # Depends on all firmwares being built
27
+ needs : build-firmwares
28
28
runs-on : ubuntu-latest
29
29
if : ${{ github.ref_type }} == 'tag'
30
30
steps :
34
34
- name : Download artifacts
35
35
uses : actions/download-artifact@v4
36
36
with :
37
- path : ./ # Downloads all artifacts to the current directory
37
+ path : ./
38
38
39
39
- name : Publish a release
40
40
env :
48
48
49
49
# Calculate SHA256 hash for the BTC_ONLY firmware
50
50
# The path assumes download-artifact placed it in Main-Release-BTC_ONLY-outputs/build/
51
- # The filename is Cypherock-Main-btc .bin due to the CMakeLists.txt modification
52
- chkmain_btc_only=$(sha256sum Main-Release-BTC_ONLY-outputs/build/Cypherock-Main-btc .bin | cut -f -1 -d ' ')
51
+ # The filename is Cypherock-Main-BTC .bin due to the CMakeLists.txt modification
52
+ chkmain_btc_only=$(sha256sum Main-Release-BTC_ONLY-outputs/build/Cypherock-Main-BTC .bin | cut -f -1 -d ' ')
53
53
54
54
APP_VERSION=$(cat version.txt | grep firmware | cut -f 2-2 -d '=' | awk -F ':' '{ print 0+$1 "." 0+$2 "." $3*2**8 + $4 }')
55
55
HW_VERSION=$(cat version.txt | grep hardware | cut -f 2-2 -d '=' | awk -F ':' '{ print 0+$1 "." 0+$2 "." $3*2**8 + $4 }')
67
67
"tag_name":"'${TAG_NAME}'",
68
68
"target_commitish":"main",
69
69
"name":"'${TAG_NAME}'",
70
- "body":"Application version: '${APP_VERSION}'\r\nHardware version: '${HW_VERSION}'\r\n## SHA256 of binaries:\r\n**Cypherock-Main.bin** : '${chkmain_multicoin}' \r\n**Cypherock-Main-btc .bin** : '${chkmain_btc_only}'",
70
+ "body":"Application version: '${APP_VERSION}'\r\nHardware version: '${HW_VERSION}'\r\n## SHA256 of binaries:\r\n**Cypherock-Main.bin** : '${chkmain_multicoin}' \r\n**Cypherock-Main-BTC .bin** : '${chkmain_btc_only}'",
71
71
"draft":true,
72
72
"prerelease":false,
73
73
"generate_release_notes":true
79
79
- name : Upload assets
80
80
env :
81
81
auth_token : ${{ secrets.GITHUB_TOKEN }}
82
- upload_url : ${{ env.upload_url }} # Use the extracted upload_url
83
82
run : |
84
83
# Upload the MULTI_COIN firmware binary
85
84
content_type_multicoin=$(file -b --mime-type Main-Release-MULTI_COIN-outputs/build/Cypherock-Main.bin)
@@ -92,14 +91,14 @@ jobs:
92
91
--data-binary @Main-Release-MULTI_COIN-outputs/build/Cypherock-Main.bin
93
92
94
93
# Upload the BTC_ONLY firmware binary
95
- content_type_btc_only=$(file -b --mime-type Main-Release-BTC_ONLY-outputs/build/Cypherock-Main-btc .bin)
94
+ content_type_btc_only=$(file -b --mime-type Main-Release-BTC_ONLY-outputs/build/Cypherock-Main-BTC .bin)
96
95
curl -X POST \
97
96
-H "Content-Type: ${content_type_btc_only}" \
98
97
-H "Accept: application/vnd.github+json" \
99
98
-H "Authorization: Bearer ${auth_token}" \
100
99
-H "X-GitHub-Api-Version: 2022-11-28" \
101
- "${upload_url}?name=Cypherock-Main-btc .bin" \
102
- --data-binary @Main-Release-BTC_ONLY-outputs/build/Cypherock-Main-btc .bin
100
+ "${upload_url}?name=Cypherock-Main-BTC .bin" \
101
+ --data-binary @Main-Release-BTC_ONLY-outputs/build/Cypherock-Main-BTC .bin
103
102
104
103
# Upload version.txt
105
104
content_type_version=$(file -b --mime-type version.txt)
0 commit comments