Обновить .woodpecker/.woodpecker.yml
This commit is contained in:
parent
2620fa8fe9
commit
b3d513ff22
1 changed files with 28 additions and 2 deletions
|
|
@ -100,8 +100,34 @@ steps:
|
|||
- source version.env
|
||||
- git config user.name "s.galanskiy"
|
||||
- git config user.email "s.galanskiy@gossys.dev"
|
||||
- git checkout develop
|
||||
- git checkout test
|
||||
- git commit -am "Релиз $VERSION"
|
||||
- git tag "v$VERSION"
|
||||
- git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git develop
|
||||
- git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION"
|
||||
|
||||
release-upload:
|
||||
image: curlimages/curl:latest
|
||||
environment:
|
||||
FORGEJO_TOKEN:
|
||||
from_secret: FORGEJO_TOKEN
|
||||
commands:
|
||||
- VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version)
|
||||
- TAG="v$VERSION"
|
||||
- DEB_PATH="../gonets_${VERSION}_amd64.deb"
|
||||
- |
|
||||
curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \
|
||||
-H "Authorization: token ${FORGEJO_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"tag_name": "'$TAG'",
|
||||
"name": "Релиз '$TAG'",
|
||||
"body": "Сборка .deb пакета для версии '$TAG'",
|
||||
"draft": false,
|
||||
"prerelease": false
|
||||
}' || true
|
||||
- |
|
||||
curl -s -X POST \
|
||||
-H "Authorization: token ${FORGEJO_TOKEN}" \
|
||||
-F "attachment=@$DEB_PATH" \
|
||||
"https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$TAG/assets"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue