Skip to content

Commit 28e92b1

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

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

codemagic.yaml

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

0 commit comments

Comments
 (0)