mirror of
https://github.com/TommyFang2077/dsh-desktop.git
synced 2026-08-17 09:06:36 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b15292dd03 | |||
| 5e9ac59c59 |
@@ -13,7 +13,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Download publish scripts
|
- name: Download publish scripts
|
||||||
run: |
|
run: |
|
||||||
BASE=https://raw.githubusercontent.com/TommyFang2077/dsh-easy-desktop/main
|
BASE=https://raw.githubusercontent.com/TommyFang2077/dsh-easy-desktop/$GITHUB_SHA
|
||||||
curl -fsSL -o build-gitea-update.py "$BASE/scripts/build-gitea-update.py"
|
curl -fsSL -o build-gitea-update.py "$BASE/scripts/build-gitea-update.py"
|
||||||
curl -fsSL -o publish-gitea-release.sh "$BASE/scripts/publish-gitea-release.sh"
|
curl -fsSL -o publish-gitea-release.sh "$BASE/scripts/publish-gitea-release.sh"
|
||||||
curl -fsSL -o publish-gitea-actions.sh "$BASE/scripts/publish-gitea-actions.sh"
|
curl -fsSL -o publish-gitea-actions.sh "$BASE/scripts/publish-gitea-actions.sh"
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ echo "target: $RELEASE_TAG ($VERSION)"
|
|||||||
echo "gitea: $GITEA_BASE_URL"
|
echo "gitea: $GITEA_BASE_URL"
|
||||||
|
|
||||||
if curl -fsS -H "Authorization: token $GITEA_TOKEN" \
|
if curl -fsS -H "Authorization: token $GITEA_TOKEN" \
|
||||||
"$GITEA_BASE_URL/api/packages/$REPO_OWNER/generic/dsh-easy-desktop-updater/$VERSION/dsh-easy-desktop_${VERSION}_darwin_aarch64.app.tar.gz" >/dev/null 2>&1; then
|
"$GITEA_BASE_URL/api/packages/$REPO_OWNER/generic/dsh-easy-desktop-updater/latest/latest.json" -o /tmp/latest.json 2>/dev/null \
|
||||||
echo "version $VERSION already published on the Gitea package feed; nothing to do"
|
&& [ "$(jq -r '.version' /tmp/latest.json)" = "$VERSION" ]; then
|
||||||
|
echo "version $VERSION already published on the Gitea feed; nothing to do"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -33,11 +34,17 @@ rm -rf artifacts staged
|
|||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
|
|
||||||
curl -fsS "https://api.github.com/repos/$GITHUB_REPO/releases/tags/$RELEASE_TAG" -o /tmp/release.json
|
curl -fsS "https://api.github.com/repos/$GITHUB_REPO/releases/tags/$RELEASE_TAG" -o /tmp/release.json
|
||||||
jq -r '.assets[].browser_download_url' /tmp/release.json | while read -r url; do
|
jq -r '.assets[].browser_download_url' /tmp/release.json > /tmp/asset-urls.txt
|
||||||
|
while read -r url; do
|
||||||
curl -fsSL --retry 3 --retry-delay 5 -o "artifacts/$(basename "$url")" "$url" &
|
curl -fsSL --retry 3 --retry-delay 5 -o "artifacts/$(basename "$url")" "$url" &
|
||||||
done
|
done < /tmp/asset-urls.txt
|
||||||
wait
|
wait
|
||||||
echo "downloaded $(find artifacts -type f | wc -l) assets"
|
COUNT=$(find artifacts -type f | wc -l)
|
||||||
|
echo "downloaded $COUNT assets"
|
||||||
|
[ "$COUNT" -ge 15 ] || {
|
||||||
|
echo "expected at least 15 release assets, got $COUNT" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
python3 build-gitea-update.py \
|
python3 build-gitea-update.py \
|
||||||
--flat-artifacts artifacts \
|
--flat-artifacts artifacts \
|
||||||
|
|||||||
Reference in New Issue
Block a user