From c70f5090229ea4dbdea823d5f92cc17e3d2e73f3 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Fri, 11 Sep 2020 14:54:02 +0300 Subject: [PATCH] [ci] Use `ghr` CLI tool to post Win32 artifact to GitHub --- .circleci/config.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 67229dcd1..f0aa36a82 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -145,6 +145,16 @@ jobs: steps: - attach_workspace: at: . + - run: | + if [[ -n $GITHUB_TOKEN ]]; then + export _GHR=ghr_v0.13.0_linux_amd64 + curl -sL https://github.com/tcnksm/ghr/releases/download/v0.13.0/$_GHR.tar.gz | tar xz --strip-components=1 $_GHR/ghr + mv harfbuzz-win32{,-$CIRCLE_TAG}.zip + echo TOKEN IS = $GITHUB_TOKEN + ./ghr -replace -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME $CIRCLE_TAG harfbuzz-win32-$CIRCLE_TAG.zip + else + echo "No GITHUB_TOKEN secret found, artifact publishing skipped" + fi workflows: version: 2