Skip to content

Commit 9685177

Browse files
committed
codemagic.yaml: add GitHub release logic
1 parent e134eb9 commit 9685177

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

codemagic.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
workflows:
22
build:
33
name: Build workflow
4+
triggering:
5+
events:
6+
- tag
7+
branch_patterns:
8+
- pattern: '*'
9+
include: true
10+
source: true
11+
environment:
12+
vars:
13+
GH_TOKEN
414
scripts:
515
- name: install dependencies
616
script: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost openssl zmq libpgm miniupnpc ldns expat libunwind-headers protobuf
@@ -24,3 +34,13 @@ workflows:
2434
script: |
2535
export ARTIFACT_NAME="aeon-mac-armv8-$(git describe --tags)"
2636
curl --upload-file build/release/$ARTIFACT_NAME.tar.bz2 https://transfer.sh/$ARTIFACT_NAME.tar.bz2
37+
- name: Publish to GitHub
38+
script: |
39+
#!/usr/bin/env zsh
40+
# Publish only for tag builds
41+
if [ -z ${CM_TAG} ]; then
42+
echo "Not a tag build, will not publish GitHub release"
43+
exit 0
44+
fi
45+
export ARTIFACT_NAME="aeon-mac-armv8-$(git describe --tags)"
46+
gh release create "${CM_TAG}" build/release/$ARTIFACT_NAME.tar.bz2

0 commit comments

Comments
 (0)