From 7e3c0c5fa5f6a87eadbbb41d171573a4e387db9e Mon Sep 17 00:00:00 2001 From: matthiasberner Date: Fri, 11 Oct 2024 07:47:13 +0200 Subject: [PATCH] .gitea/workflows/latest-release.yaml aktualisiert --- .gitea/workflows/latest-release.yaml | 41 ++++++++++++++++++---------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/latest-release.yaml b/.gitea/workflows/latest-release.yaml index 4f721ba..3421d7a 100644 --- a/.gitea/workflows/latest-release.yaml +++ b/.gitea/workflows/latest-release.yaml @@ -1,19 +1,32 @@ -name: Releases +name: Push a new tag with Pull Request -on: - push: - tags: - - '*' +on: + pull_request: + types: [closed] jobs: - - build: + release: runs-on: ubuntu-latest - permissions: - contents: write steps: - - uses: actions/checkout@v3 - - uses: ncipollo/release-action@v1 - with: - artifacts: "release.tar.gz,foo/*.txt" - bodyFile: "body.md" \ No newline at end of file + - uses: actions/checkout@v2 + + - uses: actions-ecosystem/action-release-label@v1 + id: release-label + if: ${{ gitea.event.pull_request.merged == true }} + + - uses: actions-ecosystem/action-get-latest-tag@v1 + id: get-latest-tag + if: ${{ steps.release-label.outputs.level != null }} + + - uses: actions-ecosystem/action-bump-semver@v1 + id: bump-semver + if: ${{ steps.release-label.outputs.level != null }} + with: + current_version: ${{ steps.get-latest-tag.outputs.tag }} + level: ${{ steps.release-label.outputs.level }} + + - uses: actions-ecosystem/action-push-tag@v1 + if: ${{ steps.release-label.outputs.level != null }} + with: + tag: ${{ steps.bump-semver.outputs.new_version }} + message: '${{ steps.bump-semver.outputs.new_version }}: PR #${{ gitea.event.pull_request.number }} ${{ gitea.event.pull_request.title }}' \ No newline at end of file