prerelease draft releases for testing

This commit is contained in:
Baipyrus 2024-09-06 11:41:27 +02:00
parent 6526d861d2
commit 6a188e00c2

View File

@ -5,7 +5,9 @@ name: Publish
on: on:
push: push:
tags: 'v*' tags:
- 'v*'
- 'pre*'
jobs: jobs:
build: build:
@ -68,7 +70,16 @@ jobs:
- name: Create release - name: Create release
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: ${{ github.ref_name }}
run: | run: |
gh release create "${{ github.ref_name }}" \ # If the release name starts with "pre", draft release
--title "Release ${{ github.ref_name }}" \ FLAGS=""
if [[ "$RELEASE_NAME" == pre* ]]; then
FLAGS="--prerelease --draft"
fi
# Create the release with the appropriate flags
gh release create "$RELEASE_NAME" \
--title "Release $RELEASE_NAME" \
$FLAGS \
ProxySwitcher.zip ProxySwitcher.zip