Skip to content

Commit 48259d6

Browse files
committed
fix(ci): minisign install
1 parent 985da40 commit 48259d6

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

.github/workflows/marketplace-build.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ env:
2424
CARGO_TERM_COLOR: always
2525
RUST_BACKTRACE: 1
2626
SHERPA_ONNX_VERSION: "1.12.17"
27+
MINISIGN_VERSION: "0.12"
2728
MARKETPLACE_VERSION: ${{ inputs.version }}
2829
RELEASE_TAG: ${{ inputs.release_tag }}
2930
REGISTRY_BASE_URL: ${{ inputs.registry_base_url || format('https://{0}.github.io/streamkit/registry', github.repository_owner) }}
@@ -40,7 +41,45 @@ jobs:
4041
- name: Install system dependencies
4142
run: |
4243
sudo apt-get update
43-
sudo apt-get install -y cmake pkg-config libclang-dev wget libopenblas-dev zstd minisign patchelf python3-yaml
44+
sudo apt-get install -y cmake pkg-config libclang-dev wget libopenblas-dev zstd patchelf python3-yaml
45+
46+
- name: Install minisign
47+
run: |
48+
tar_path="/tmp/minisign-${MINISIGN_VERSION}-linux.tar.gz"
49+
wget -O "${tar_path}" \
50+
https://github.com/jedisct1/minisign/releases/download/${MINISIGN_VERSION}/minisign-${MINISIGN_VERSION}-linux.tar.gz
51+
extract_dir="/tmp/minisign-${MINISIGN_VERSION}"
52+
mkdir -p "${extract_dir}"
53+
minisign_path="$(
54+
TAR_PATH="${tar_path}" EXTRACT_DIR="${extract_dir}" python3 - <<'PY'
55+
import os
56+
import pathlib
57+
import sys
58+
import tarfile
59+
60+
extract_dir = pathlib.Path(os.environ["EXTRACT_DIR"])
61+
tar_path = pathlib.Path(os.environ["TAR_PATH"])
62+
63+
with tarfile.open(tar_path, "r:gz") as tar:
64+
tar.extractall(extract_dir)
65+
66+
preferred = extract_dir / "minisign-linux" / "x86_64" / "minisign"
67+
if preferred.exists():
68+
print(preferred)
69+
sys.exit(0)
70+
71+
candidates = list(extract_dir.rglob("minisign"))
72+
if not candidates:
73+
sys.exit(1)
74+
print(candidates[0])
75+
PY
76+
)"
77+
if [ -z "${minisign_path}" ]; then
78+
echo "minisign binary not found in ${extract_dir}"
79+
exit 1
80+
fi
81+
sudo install -m 0755 "${minisign_path}" /usr/local/bin/minisign
82+
minisign -h >/dev/null
4483
4584
- name: Install sherpa-onnx
4685
run: |

.github/workflows/marketplace-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ env:
2525
jobs:
2626
marketplace:
2727
uses: ./.github/workflows/marketplace-build.yml
28+
permissions:
29+
contents: write
30+
pull-requests: write
2831
with:
2932
version: ${{ inputs.version }}
3033
release_tag: ${{ inputs.release_tag || format('marketplace-v{0}', inputs.version) }}

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ jobs:
8282
8383
marketplace:
8484
uses: ./.github/workflows/marketplace-build.yml
85+
permissions:
86+
contents: write
87+
pull-requests: write
8588
with:
8689
version: ${{ github.ref_name }}
8790
release_tag: ${{ github.ref_name }}

0 commit comments

Comments
 (0)