fix: 优化打包后的目录结构,便于引入 #17

Merged
7iwind merged 1 commits from feature/route into develop 2026-07-26 15:07:22 +08:00
2 changed files with 18 additions and 9 deletions
Showing only changes of commit e3c40c822b - Show all commits
+18 -8
View File
@@ -55,22 +55,32 @@ jobs:
run: |
TAG="${{ steps.tag.outputs.tag }}"
API="${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases"
TOKEN="${{ gitea.token }}"
echo "=== Creating release $TAG ==="
RESP=$(curl -s -X POST \
-H "Authorization: token ${{ gitea.token }}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"${TAG}\",\"name\":\"DataRouter ${TAG}\"}" \
"$API")
# Check if release already exists
echo "=== Checking existing releases for $TAG ==="
EXISTING=$(curl -s -H "Authorization: token ${TOKEN}" "${API}" | \
python3 -c "import sys,json;rels=json.load(sys.stdin);print(next((r['id'] for r in rels if r['tag_name']=='${TAG}'),''))")
ID=$(echo "$RESP" | python3 -c "import sys,json;print(json.load(sys.stdin)['id'])")
if [ -n "$EXISTING" ]; then
ID="$EXISTING"
echo "Release already exists (ID=$ID), updating it"
else
echo "=== Creating release $TAG ==="
RESP=$(curl -s -X POST \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"${TAG}\",\"name\":\"DataRouter ${TAG}\"}" \
"$API")
ID=$(echo "$RESP" | python3 -c "import sys,json;d=json.loads(sys.stdin.read());print(d['id'])")
fi
for dir in dist/*/; do
name="$(basename "$dir").tar.gz"
tar czf "/tmp/$name" -C "$dir" .
echo "Uploading $name"
curl -s -X POST \
-H "Authorization: token ${{ gitea.token }}" \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"/tmp/$name" \
"${API}/${ID}/assets?name=${name}"
-1
View File
@@ -2,7 +2,6 @@
<project version="4">
<component name="CidrCTestProjectState">
<ctestState>
<lineNumber testId="path:CMakeLists.txt test:datarouter" value="28" />
<lineNumber testId="path:null test:datarouter" value="28" />
</ctestState>
</component>