From 20a753be2c2ec193c08f1752e9a30b81a0302872 Mon Sep 17 00:00:00 2001 From: Keine Secrets <80967338+whynotmax@users.noreply.github.com> Date: Thu, 10 Jul 2025 19:46:46 +0200 Subject: [PATCH 1/2] Update release.yml --- .github/workflows/release.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e103ed..97d6636 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ permissions: on: push: - branches: [ master, main ] + branches: [ master, main, dev ] # ← Added "dev" here workflow_dispatch: inputs: firstName: @@ -45,14 +45,12 @@ jobs: - name: Build shadowJar run: ./gradlew shadowJar - # 1) JAR-Pfad bestimmen - name: Find built JAR id: jar run: | JAR_PATH=$(ls build/libs/*.jar | head -n1) echo "jar_path=$JAR_PATH" >> $GITHUB_OUTPUT - # 2) Version aus plugin.yml im JAR extrahieren - name: Extract version from JAR id: vars run: | @@ -61,22 +59,19 @@ jobs: | sed 's/version:[ ]*//') echo "version=$VERSION" >> $GITHUB_OUTPUT - # 3) Alle Tags holen, um lokal prüfen zu können - name: Fetch all tags run: git fetch --tags - # 4) Abbrechen, wenn der Tag schon existiert - name: Check if tag exists run: | TAG=${{ steps.vars.outputs.version }} if git ls-remote --tags origin "refs/tags/$TAG" | grep -q "$TAG"; then - echo "❌ Tag '$TAG' existiert bereits. Breche ab." + echo "❌ Tag '$TAG' already exists. Exiting." exit 1 else - echo "✅ Tag '$TAG' ist neu. Fortfahren..." + echo "✅ Tag '$TAG' is new. Continuing..." fi - # 5) Release anlegen (Prerelease, wenn SNAPSHOT) - name: Create Release id: create uses: actions/create-release@v1 @@ -86,10 +81,9 @@ jobs: tag_name: ${{ steps.vars.outputs.version }} release_name: ${{ steps.vars.outputs.version }} draft: false - # Prerelease = true, wenn Version auf "-SNAPSHOT" endet - prerelease: ${{ endsWith( steps.vars.outputs.version, '-SNAPSHOT' ) }} + # Always prerelease if we're on dev, otherwise only for -SNAPSHOT + prerelease: ${{ github.ref == 'refs/heads/dev' || endsWith( steps.vars.outputs.version, '-SNAPSHOT' ) }} - # 6) JAR hochladen - name: Upload JAR uses: actions/upload-release-asset@v1 env: From a30e1945145828f901991a3d915d64a418f24c05 Mon Sep 17 00:00:00 2001 From: Keine Secrets <80967338+whynotmax@users.noreply.github.com> Date: Thu, 10 Jul 2025 19:48:25 +0200 Subject: [PATCH 2/2] Update .github/workflows/release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97d6636..3d63524 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,7 +82,7 @@ jobs: release_name: ${{ steps.vars.outputs.version }} draft: false # Always prerelease if we're on dev, otherwise only for -SNAPSHOT - prerelease: ${{ github.ref == 'refs/heads/dev' || endsWith( steps.vars.outputs.version, '-SNAPSHOT' ) }} + prerelease: ${{ (github.ref == 'refs/heads/dev') || (endsWith(steps.vars.outputs.version, '-SNAPSHOT')) }} - name: Upload JAR uses: actions/upload-release-asset@v1