From dd4396db06f90aa1bd3ae9a2509ae0d28187db86 Mon Sep 17 00:00:00 2001 From: MMarcus95 Date: Thu, 25 Jun 2026 16:58:16 +0200 Subject: [PATCH 1/3] trigger pipeline --- main.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/main.txt b/main.txt index e69de29..8e08f3b 100644 --- a/main.txt +++ b/main.txt @@ -0,0 +1 @@ +sdasd \ No newline at end of file From 0b7335b3f8d2bcddd371fbe3a5da63e3920b0cf4 Mon Sep 17 00:00:00 2001 From: MMarcus95 Date: Thu, 25 Jun 2026 17:01:01 +0200 Subject: [PATCH 2/3] removed push force and latest update --- .github/workflows/create-release.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 5f728aa..801f216 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -131,17 +131,4 @@ jobs: files: release-assets/a make_latest: false env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Mark latest main release - if: github.ref_name == 'main' - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - - git tag -f latest "$GITHUB_SHA" - git push origin latest --force - - gh release edit "$RELEASE_TAG" --latest - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From b4b987d5f1373eac897079a8998945f1823d0972 Mon Sep 17 00:00:00 2001 From: MMarcus95 Date: Thu, 25 Jun 2026 17:08:39 +0200 Subject: [PATCH 3/3] added cleanup temp releases --- .github/workflows/cleanup-temp-releases.yml | 72 +++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/cleanup-temp-releases.yml diff --git a/.github/workflows/cleanup-temp-releases.yml b/.github/workflows/cleanup-temp-releases.yml new file mode 100644 index 0000000..8a6e4c5 --- /dev/null +++ b/.github/workflows/cleanup-temp-releases.yml @@ -0,0 +1,72 @@ +name: Cleanup Temporary Branch Releases + +on: + pull_request: + types: + - closed + branches: + - main + +permissions: + contents: write + pull-requests: read + +jobs: + cleanup-temp-releases: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + steps: + - name: Normalize merged branch name + run: | + BRANCH_NAME="${{ github.event.pull_request.head.ref }}" + + SAFE_BRANCH="${BRANCH_NAME//\//-}" + SAFE_BRANCH="${SAFE_BRANCH//_/-}" + SAFE_BRANCH="$(echo "$SAFE_BRANCH" | tr '[:upper:]' '[:lower:]')" + + echo "BRANCH_NAME=$BRANCH_NAME" >> "$GITHUB_ENV" + echo "SAFE_BRANCH=$SAFE_BRANCH" >> "$GITHUB_ENV" + + echo "Merged branch: $BRANCH_NAME" + echo "Safe branch: $SAFE_BRANCH" + + - name: Delete temporary releases and tags for merged branch + run: | + PREFIX="temp-${SAFE_BRANCH}-v" + + echo "Looking for releases with prefix: $PREFIX" + + RELEASE_TAGS="$( + gh api \ + --paginate \ + "repos/${GITHUB_REPOSITORY}/releases" \ + --jq '.[].tag_name' \ + | grep -E "^${PREFIX}[0-9]+$" \ + || true + )" + + if [ -z "$RELEASE_TAGS" ]; then + echo "No temporary releases found for branch: $BRANCH_NAME" + exit 0 + fi + + echo "Found temporary releases:" + echo "$RELEASE_TAGS" + + while IFS= read -r TAG; do + if [ -z "$TAG" ]; then + continue + fi + + echo "Deleting release and tag: $TAG" + + gh release delete "$TAG" \ + --yes \ + --cleanup-tag + done <