You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2025/08/16 07:13:03 UTC
(struts-intellij-plugin) 01/01: Removes old prereleases
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch fix/clean-old-prerelease
in repository https://gitbox.apache.org/repos/asf/struts-intellij-plugin.git
commit 9129684487eee91e8114535b1f5d8ae631d5a884
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Sat Aug 16 09:12:53 2025 +0200
Removes old prereleases
---
.github/workflows/build.yml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7458f1e..00c006b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -296,6 +296,21 @@ jobs:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*
+ # Delete previous pre-release if it exists
+ - name: Delete Previous Pre-release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ # Get the latest pre-release (excluding the current version we're about to create)
+ LATEST_PRERELEASE=$(gh release list --limit 50 --json tagName,isPrerelease --jq '.[] | select(.isPrerelease == true) | .tagName' | head -1 2>/dev/null || echo "")
+
+ if [ -n "$LATEST_PRERELEASE" ] && [ "$LATEST_PRERELEASE" != "v${{ steps.version.outputs.version }}" ]; then
+ echo "Deleting previous pre-release: $LATEST_PRERELEASE"
+ gh release delete "$LATEST_PRERELEASE" --yes --cleanup-tag
+ else
+ echo "No previous pre-release found to delete"
+ fi
+
# Create a new pre-release
- name: Create Pre-release
env: