fix(ci): replace zip with tar for dashboard-ui packaging
Beta Release / deploy (push) Failing after 0s

This commit is contained in:
datadunia
2026-05-30 16:41:00 +07:00
parent f8d3c1ca18
commit 7793215e96
+34 -34
View File
@@ -85,19 +85,19 @@ jobs:
RELEASE_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" RELEASE_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
REPO="${{ gitea.repository }}" REPO="${{ gitea.repository }}"
SERVER="${{ gitea.server_url }}" SERVER="${{ gitea.server_url }}"
cat > latest.json << ENDJSON cat > latest.json << ENDJSON
{ {
"version": "$VERSION", "version": "$VERSION",
"release_date": "$RELEASE_DATE", "release_date": "$RELEASE_DATE",
"download_urls": { "download_urls": {
"server-core": "${SERVER}/${REPO}/releases/download/${VERSION}/server-core-linux-amd64", "server-core": "${SERVER}/${REPO}/releases/download/${VERSION}/server-core-linux-amd64",
"device-agent-linux-amd64": "${SERVER}/${REPO}/releases/download/${VERSION}/nexus-device-agent-linux-amd64", "device-agent-linux-amd64": "${SERVER}/${REPO}/releases/download/${VERSION}/nexus-device-agent-linux-amd64",
"device-agent-linux-arm64": "${SERVER}/${REPO}/releases/download/${VERSION}/nexus-device-agent-linux-arm64", "device-agent-linux-arm64": "${SERVER}/${REPO}/releases/download/${VERSION}/nexus-device-agent-linux-arm64",
"device-agent-windows-amd64": "${SERVER}/${REPO}/releases/download/${VERSION}/nexus-device-agent-windows-amd64.exe", "device-agent-windows-amd64": "${SERVER}/${REPO}/releases/download/${VERSION}/nexus-device-agent-windows-amd64.exe",
"dashboard-ui": "${SERVER}/${REPO}/releases/download/${VERSION}/dashboard-ui-dist.zip" "dashboard-ui": "${SERVER}/${REPO}/releases/download/${VERSION}/dashboard-ui-dist.tar.gz"
} }
} }
ENDJSON ENDJSON
- name: Create Release and upload assets - name: Create Release and upload assets
env: env:
@@ -185,19 +185,19 @@ jobs:
"$API/repos/$REPO/releases/$RELEASE_ID/assets?name=nexus-device-agent-windows-amd64.exe" "$API/repos/$REPO/releases/$RELEASE_ID/assets?name=nexus-device-agent-windows-amd64.exe"
fi fi
# Dashboard UI dist # Dashboard UI dist
if [ -d "apps/dashboard-ui/dist" ]; then if [ -d "apps/dashboard-ui/dist" ]; then
echo "Creating dashboard-ui-dist.zip..." echo "Creating dashboard-ui-dist.tar.gz..."
cd apps/dashboard-ui cd apps/dashboard-ui
zip -r ../dashboard-ui-dist.zip dist/ tar -czf ../dashboard-ui-dist.tar.gz dist/
cd .. cd ..
echo "Uploading dashboard-ui-dist.zip..." echo "Uploading dashboard-ui-dist.tar.gz..."
curl -s -X POST \ curl -s -X POST \
-H "Authorization: token $TOKEN" \ -H "Authorization: token $TOKEN" \
-F "attachment=@dashboard-ui-dist.zip" \ -F "attachment=@dashboard-ui-dist.tar.gz" \
"$API/repos/$REPO/releases/$RELEASE_ID/assets?name=dashboard-ui-dist.zip" "$API/repos/$REPO/releases/$RELEASE_ID/assets?name=dashboard-ui-dist.tar.gz"
fi fi
# latest.json # latest.json
if [ -f "latest.json" ]; then if [ -f "latest.json" ]; then
@@ -208,11 +208,11 @@ jobs:
"$API/repos/$REPO/releases/$RELEASE_ID/assets?name=latest.json" "$API/repos/$REPO/releases/$RELEASE_ID/assets?name=latest.json"
fi fi
- name: Cleanup build artifacts - name: Cleanup build artifacts
if: always() if: always()
run: | run: |
git config --global --remove-section http || true git config --global --remove-section http || true
git config --global --unset-all core.askPass || true git config --global --unset-all core.askPass || true
rm -f latest.json dashboard-ui-dist.zip rm -f latest.json dashboard-ui-dist.tar.gz
rm -rf apps/server-core/bin apps/device-agent/bin apps/dashboard-ui/node_modules apps/dashboard-ui/dist rm -rf apps/server-core/bin apps/device-agent/bin apps/dashboard-ui/node_modules apps/dashboard-ui/dist
echo "Cleanup done" echo "Cleanup done"