From fdf0ed6656f7ffb05833c01bf357c37f0577c72b Mon Sep 17 00:00:00 2001 From: ksqsf Date: Mon, 9 Sep 2024 21:04:35 +0200 Subject: [PATCH] chore(ci): auto discover git ref of librime artifacts --- .github/workflows/commit-ci.yml | 1 + .github/workflows/release-ci.yml | 3 +++ action-install.sh | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/commit-ci.yml b/.github/workflows/commit-ci.yml index 339095617..cb86a96c3 100644 --- a/.github/workflows/commit-ci.yml +++ b/.github/workflows/commit-ci.yml @@ -20,6 +20,7 @@ jobs: - name: Configure build environment run: | + brew install jq echo git_ref_name="$(git describe --always)" >> $GITHUB_ENV - name: Build Squirrel diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index 86d66e329..4fad7d02e 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -27,6 +27,9 @@ jobs: - name: Lint run: swiftlint + - name: Configure build environment + run: brew install jq + - name: Build Squirrel run: ./action-build.sh archive diff --git a/action-install.sh b/action-install.sh index d5a0cbdb1..cc6da63b0 100755 --- a/action-install.sh +++ b/action-install.sh @@ -3,7 +3,7 @@ set -e rime_version=latest -rime_git_hash=24f0f7b +rime_git_hash=`curl https://api.github.com/repos/rime/librime/releases/tags/latest | jq '.assets | .[] | select(.name | contains("macOS")) | .name' | jq -s '.[0]' -r | cut -d- -f2` sparkle_version=2.6.2 rime_archive="rime-${rime_git_hash}-macOS-universal.tar.bz2"