From a29fc96f18dd22ad47b779038c53bf8348633543 Mon Sep 17 00:00:00 2001 From: Neshura Date: Wed, 3 Jan 2024 18:23:39 +0000 Subject: [PATCH 1/2] Add prerelease input to action.yml --- action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 92ee416..cd5fe69 100644 --- a/action.yml +++ b/action.yml @@ -32,7 +32,10 @@ inputs: verbose: description: 'Increase the verbosity level' default: 'false' - + prerelease: + description: 'Mark Release as Pre-Release' + default: 'false' + runs: using: "composite" steps: @@ -60,6 +63,8 @@ runs: TAG=${TAG##refs/tags/} fi + export PRERELEASE="${{ inputs.prerelease }}" + export TOKEN="${{ inputs.token }}" export RELEASE_DIR="${{ inputs.release-dir }}" From 81f7998d0e2501749280bbe9832ae18cdbd8c455 Mon Sep 17 00:00:00 2001 From: Neshura Date: Wed, 3 Jan 2024 18:25:06 +0000 Subject: [PATCH 2/2] Add PRELEASE handling to forgejo-release.sh --- forgejo-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forgejo-release.sh b/forgejo-release.sh index 54736c7..4515d02 100755 --- a/forgejo-release.sh +++ b/forgejo-release.sh @@ -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')