mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2024-11-22 10:13:25 +01:00
Merge pull request 'Add ability to manually specify pre-releases' (#3) from Neshura/forgejo-release:main into main
Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/3 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
This commit is contained in:
commit
54df7acad2
2 changed files with 7 additions and 2 deletions
|
@ -32,6 +32,9 @@ inputs:
|
|||
verbose:
|
||||
description: 'Increase the verbosity level'
|
||||
default: 'false'
|
||||
prerelease:
|
||||
description: 'Mark Release as Pre-Release'
|
||||
default: 'false'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
|
@ -60,6 +63,8 @@ runs:
|
|||
TAG=${TAG##refs/tags/}
|
||||
fi
|
||||
|
||||
export PRERELEASE="${{ inputs.prerelease }}"
|
||||
|
||||
export TOKEN="${{ inputs.token }}"
|
||||
|
||||
export RELEASE_DIR="${{ inputs.release-dir }}"
|
||||
|
|
|
@ -40,7 +40,7 @@ ensure_tag() {
|
|||
upload_release() {
|
||||
local assets=$(ls $RELEASE_DIR/* | sed -e 's/^/-a /')
|
||||
local releasetype
|
||||
echo "${TAG}" | grep -qi '\-rc' && export releasetype="--prerelease" && echo "Uploading as Pre-Release"
|
||||
( $PRERELEASE || echo "${TAG}" | grep -qi '\-rc' ) && export releasetype="--prerelease" && echo "Uploading as Pre-Release"
|
||||
test ${releasetype+false} || echo "Uploading as Stable"
|
||||
ensure_tag
|
||||
anchor=$(echo $TAG | sed -e 's/^v//' -e 's/[^a-zA-Z0-9]/-/g')
|
||||
|
|
Loading…
Reference in a new issue