From bf2fb6832f02aba6eb43cb6375331e0239e959d7 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Wed, 13 Sep 2023 07:46:48 +0200 Subject: [PATCH] Mark github releases as pre-release automatically --- .github/workflows/package.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 18e2babab6..68951b0178 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -287,12 +287,19 @@ jobs: run: | PICARD_VERSION=$(python -c "import picard; print(picard.__version__)") echo "version=$PICARD_VERSION" >> $GITHUB_OUTPUT + if [[ "$PICARD_VERSION" =~ (a|b|rc|dev) ]]; then + echo "::notice::Releasing pre-release $PICARD_VERSION" + echo "prerelease=true" >> $GITHUB_OUTPUT + else + echo "::notice::Releasing production release $PICARD_VERSION" + fi ./scripts/tools/changelog-for-version.py $PICARD_VERSION > changes-$PICARD_VERSION.txt - name: Create release uses: softprops/action-gh-release@v1 with: name: MusicBrainz Picard ${{ steps.changelog.outputs.version }} body_path: changes-${{ steps.changelog.outputs.version }}.txt + prerelease: ${{ steps.changelog.outputs.prerelease }} files: artifacts/* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}