mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2024-11-23 19:11:08 -05:00
Add ability to set the release title
This PR allows you the set/override the release title, which was set to the tag and still defaults to the tag.
This commit is contained in:
parent
a5aa633273
commit
b0876c539d
2 changed files with 7 additions and 2 deletions
|
@ -10,6 +10,8 @@ inputs:
|
|||
description: 'owner/project relative to the URL'
|
||||
tag:
|
||||
description: 'Tag of the release'
|
||||
title:
|
||||
description: 'Title of the release (defaults to tag)'
|
||||
sha:
|
||||
description: 'SHA of the release'
|
||||
token:
|
||||
|
@ -69,6 +71,8 @@ runs:
|
|||
TAG=${TAG##refs/tags/}
|
||||
fi
|
||||
|
||||
export TITLE="${{ inputs.title }}"
|
||||
|
||||
export DOWNLOAD_LATEST="${{ inputs.download-latest }}"
|
||||
|
||||
export PRERELEASE="${{ inputs.prerelease }}"
|
||||
|
|
|
@ -7,6 +7,7 @@ if ${VERBOSE:-false}; then set -x; fi
|
|||
|
||||
: ${FORGEJO:=https://codeberg.org}
|
||||
: ${REPO:=forgejo-integration/forgejo}
|
||||
: ${TITLE:=$TAG}
|
||||
: ${RELEASE_DIR:=dist/release}
|
||||
: ${DOWNLOAD_LATEST:=false}
|
||||
: ${TMP_DIR:=$(mktemp -d)}
|
||||
|
@ -47,11 +48,11 @@ upload_release() {
|
|||
test ${releasetype+false} || echo "Uploading as Stable"
|
||||
ensure_tag
|
||||
anchor=$(echo $TAG | sed -e 's/^v//' -e 's/[^a-zA-Z0-9]/-/g')
|
||||
if ! $BIN_DIR/tea release create $assets --repo $REPO --note "$RELEASENOTES" --tag $TAG --title $TAG --draft ${releasetype} >& $TMP_DIR/tea.log ; then
|
||||
if ! $BIN_DIR/tea release create $assets --repo $REPO --note "$RELEASENOTES" --tag $TAG --title "$TITLE" --draft ${releasetype} >& $TMP_DIR/tea.log ; then
|
||||
if grep --quiet 'Unknown API Error: 500' $TMP_DIR/tea.log && grep --quiet services/release/release.go:194 $TMP_DIR/tea.log ; then
|
||||
echo "workaround v1.20 race condition https://codeberg.org/forgejo/forgejo/issues/1370"
|
||||
sleep 10
|
||||
$BIN_DIR/tea release create $assets --repo $REPO --note "$RELEASENOTES" --tag $TAG --title $TAG --draft ${releasetype}
|
||||
$BIN_DIR/tea release create $assets --repo $REPO --note "$RELEASENOTES" --tag $TAG --title "$TITLE" --draft ${releasetype}
|
||||
else
|
||||
cat $TMP_DIR/tea.log
|
||||
return 1
|
||||
|
|
Loading…
Reference in a new issue