forked from cryptonotefoundation/cryptonote
-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (43 loc) · 1.57 KB
/
macOS.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
42
43
44
45
46
47
name: macOS
on:
push:
tags:
- "*"
jobs:
build-macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@master
- name: Build
id: build
run: |
build_folder="build/"
xfg_ver=$(echo ${{ github.ref }} | sed 's|refs/tags/||')
release_name="fuego-cli-macOS-v$xfg_ver"
brew install gcc boost
mkdir "$build_folder"
cd "$build_folder"
cmake -DCMAKE_C_FLAGS="-mmacosx-version-min=10.12" -DCMAKE_CXX_FLAGS="-mmacosx-version-min=10.12" ..
make -j2
mkdir "$release_name"
exeFiles=()
for f in src/*; do [[ -x $f && -f $f ]] && strip "$f" && exeFiles+=( "$f" ); done
cp "${exeFiles[@]}" "$release_name/"
zip -r "$release_name".zip "$release_name"
sha256=$(shasum -a 256 "$release_name".zip | awk '{print toupper($1)}')
asset_path="./$build_folder$release_name.zip"
echo "::set-output name=sha256::${sha256}"
echo "::set-output name=release_name::${release_name}.zip"
echo "::set-output name=asset_path::${asset_path}"
echo "::set-output name=xfg_ver::${xfg_ver}"
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.build.outputs.asset_path }}
name: Fango CLI Suite v${{ steps.build.outputs.xfg_ver }}
body: |
**${{ steps.build.outputs.release_name }}**
${{ steps.build.outputs.sha256 }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}