flags array and adjusting release title

This commit is contained in:
Baipyrus 2024-09-06 11:47:07 +02:00
parent 6a188e00c2
commit f6d673773a

View File

@ -73,13 +73,15 @@ jobs:
RELEASE_NAME: ${{ github.ref_name }} RELEASE_NAME: ${{ github.ref_name }}
run: | run: |
# If the release name starts with "pre", draft release # If the release name starts with "pre", draft release
FLAGS="" FLAGS=()
TITLE="Release $RELEASE_NAME"
if [[ "$RELEASE_NAME" == pre* ]]; then if [[ "$RELEASE_NAME" == pre* ]]; then
FLAGS="--prerelease --draft" FLAGS+=(--prerelease --draft)
TITLE="Prerelease $RELEASE_NAME"
fi fi
# Create the release with the appropriate flags # Create the release with the appropriate flags
gh release create "$RELEASE_NAME" \ gh release create "$RELEASE_NAME" \
--title "Release $RELEASE_NAME" \ --title "$TITLE" \
$FLAGS \ "${FLAGS[@]}" \
ProxySwitcher.zip ProxySwitcher.zip