Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cf66f18dc |
Vendored
+10
-1
@@ -60,19 +60,28 @@ pipeline {
|
|||||||
REPO="VoidLoader/VoidLoaderCore"
|
REPO="VoidLoader/VoidLoaderCore"
|
||||||
TAG="build-${BUILD_NUMBER}"
|
TAG="build-${BUILD_NUMBER}"
|
||||||
|
|
||||||
|
# Create release if it does not exist
|
||||||
curl -X POST -H "Authorization: token $GITEA_TOKEN" \
|
curl -X POST -H "Authorization: token $GITEA_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\\"tag_name\\": \\"$TAG\\", \\"name\\": \\"$TAG\\"}" \
|
-d "{\\"tag_name\\": \\"$TAG\\", \\"name\\": \\"$TAG\\"}" \
|
||||||
$GITEA_URL/api/v1/repos/$REPO/releases || true
|
$GITEA_URL/api/v1/repos/$REPO/releases || true
|
||||||
|
|
||||||
|
# Get release ID
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
"$GITEA_URL/api/v1/repos/$REPO/releases/tags/$TAG" | jq -r '.id')
|
||||||
|
|
||||||
|
echo "Release ID = $RELEASE_ID"
|
||||||
|
|
||||||
|
# Upload asset
|
||||||
curl -X POST -H "Authorization: token $GITEA_TOKEN" \
|
curl -X POST -H "Authorization: token $GITEA_TOKEN" \
|
||||||
-F "attachment=@VoidLoader.zip" \
|
-F "attachment=@VoidLoader.zip" \
|
||||||
"$GITEA_URL/api/v1/repos/$REPO/releases/$TAG/assets"
|
"$GITEA_URL/api/v1/repos/$REPO/releases/$RELEASE_ID/assets"
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user