Обновить .woodpecker/.woodpecker.yml
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
c4f0a695dc
commit
3bb3eb19c8
1 changed files with 1 additions and 7 deletions
|
|
@ -110,32 +110,26 @@ steps:
|
|||
. ./version.env
|
||||
TAG="v$VERSION"
|
||||
|
||||
# Найти .deb файл в родительской директории
|
||||
DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_${VERSION}_amd64.deb" | head -n 1)
|
||||
DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_*_amd64.deb" | head -n 1)
|
||||
|
||||
# Проверка наличия файла
|
||||
if [ ! -f "$DEB_PATH" ]; then
|
||||
echo "❌ .deb файл не найден по пути: $DEB_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Создание релиза
|
||||
RELEASE_JSON=$(curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \
|
||||
-H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\": \"$TAG\", \"name\": \"Релиз $TAG\", \"body\": \"Сборка .deb пакета для версии $TAG\", \"draft\": false, \"prerelease\": true}")
|
||||
|
||||
# Извлечение ID релиза
|
||||
RELEASE_ID=$(echo "$RELEASE_JSON" | grep '"id":' | head -n1 | sed 's/[^0-9]*\([0-9]*\).*/\1/')
|
||||
|
||||
# Проверка ID
|
||||
if [ -z "$RELEASE_ID" ]; then
|
||||
echo "❌ Не удалось получить ID релиза из ответа:"
|
||||
echo "$RELEASE_JSON"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Загрузка .deb файла как asset
|
||||
curl -s -X POST \
|
||||
-H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \
|
||||
-F "attachment=@$DEB_PATH" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue