(feat): update workflows for better releases
This commit is contained in:
parent
fa2b40cbb6
commit
075964a449
3 changed files with 122 additions and 8 deletions
|
|
@ -54,13 +54,14 @@ jobs:
|
|||
REPO: ${{ forgejo.repository }}
|
||||
SHA: ${{ forgejo.sha }}
|
||||
TAG: ${{ steps.version.outputs.tag }}
|
||||
VERSION: ${{ steps.version.outputs.version }}
|
||||
run: |
|
||||
set -eu
|
||||
|
||||
test -d releases
|
||||
find releases -type f | grep -q .
|
||||
|
||||
COMMIT_MSG="$(git log -1 --pretty=%B)"
|
||||
|
||||
HTTP_STATUS=$(curl -s -w "%{http_code}" -o release_out.json -H "Authorization: token $TOKEN" "$API/repos/$REPO/releases/tags/$TAG")
|
||||
|
||||
if [ "$HTTP_STATUS" = "200" ]; then
|
||||
|
|
@ -74,7 +75,7 @@ jobs:
|
|||
-d "$(jq -n \
|
||||
--arg tag "$TAG" \
|
||||
--arg name "$TAG" \
|
||||
--arg body "Release $VERSION" \
|
||||
--arg body "$COMMIT_MSG" \
|
||||
--arg target "$SHA" \
|
||||
'{
|
||||
tag_name: $tag,
|
||||
|
|
|
|||
Loading…
Reference in a new issue