File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010
1111jobs :
1212 build :
13- name : Publish Binaries
14- runs-on : ubuntu-latest
13+ name : Publish for ${{ matrix.os }}
14+ runs-on : ${{ matrix.os }}
15+ strategy :
16+ matrix :
17+ include :
18+ - os : ubuntu-latest
19+ artifact_name : heimdall
20+ asset_name : heimdall-linux-amd64
21+ - os : macos-latest
22+ artifact_name : heimdall
23+ asset_name : heimdall-macos-amd64
1524
1625 steps :
1726 - uses : actions/checkout@v2
2130 - name : Upload Binaries
2231 uses : svenstaro/upload-release-action@v2
2332 with :
24- file : ./heimdall/target/release/heimdall
25- asset_name : heimdall
33+ file : ./heimdall/target/release/${{ matrix.artifact_name }}
34+ asset_name : ${{ matrix.asset_name }}
2635 tag : ${{ github.ref }}
2736 overwrite : true
Original file line number Diff line number Diff line change @@ -84,11 +84,18 @@ main() {
8484 fi
8585
8686 if [ -n " $USE_BINARY " ]; then
87-
88- echo " bifrost: fetching binary."
8987
9088 ensure cd $BIFROST_BIN_DIR
91- ensure curl -k -L -s --compressed " https://github.com/Jon-Becker/heimdall-rs/releases/download/$TARGET_VERSION /heimdall" -o heimdall
89+ echo " bifrost: fetching binary."
90+
91+ if [[ " $OSTYPE " == " linux-gnu" * ]]; then
92+ ensure curl -k -L -s --compressed " https://github.com/Jon-Becker/heimdall-rs/releases/download/$TARGET_VERSION /heimdall-linux-amd64" -o heimdall
93+ elif [[ " $OSTYPE " == " darwin" * ]]; then
94+ ensure curl -k -L -s --compressed " https://github.com/Jon-Becker/heimdall-rs/releases/download/$TARGET_VERSION /heimdall-macos-amd64" -o heimdall
95+ else
96+ echo " bifrost: unsupported operating system: $OSTYPE "
97+ exit 1
98+ fi
9299
93100 echo " bifrost: installing binary."
94101
You can’t perform that action at this time.
0 commit comments