From db0f84d07207c2a835839c61df2b3a3c4e9fe99c 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 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/codemagic.yaml b/codemagic.yaml index 3774a3fb46..ff257d5fc3 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -1,6 +1,17 @@ +environment: + vars: + GH_TOKEN + workflows: build: name: Build workflow + triggering: + events: + - tag + branch_patterns: + - pattern: '*' + include: true + source: true 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 +51,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