From ca5617ecb4826a15aee68f4b31a979d452e5ed4a Mon Sep 17 00:00:00 2001 From: stoffu Date: Tue, 17 Jan 2023 17:40:05 +0900 Subject: [PATCH] codemagic.yaml: add GitHub release logic requires #277 --- codemagic.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/codemagic.yaml b/codemagic.yaml index 3774a3fb46..30759f9640 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -1,6 +1,16 @@ workflows: build: name: Build workflow + triggering: + events: + - tag + branch_patterns: + - pattern: '*' + include: true + source: true + environment: + groups: + - github scripts: - name: install dependencies script: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost openssl zmq libpgm miniupnpc ldns expat libunwind-headers protobuf qt@5 @@ -40,3 +50,13 @@ workflows: script: | export ARTIFACT_NAME="aeon-gui-mac-armv8-$(git describe --tags)" curl --upload-file build/release/$ARTIFACT_NAME.tar.bz2 https://transfer.sh/$ARTIFACT_NAME.tar.bz2 + - name: Publish to GitHub + script: | + #!/usr/bin/env zsh + # Publish only for tag builds + if [ -z ${CM_TAG} ]; then + echo "Not a tag build, will not publish GitHub release" + exit 0 + fi + export ARTIFACT_NAME="aeon-gui-mac-armv8-$(git describe --tags)" + gh release create "${CM_TAG}" build/release/$ARTIFACT_NAME.tar.bz2