From 06725de8d2328590fb13b564a347c38e29702304 Mon Sep 17 00:00:00 2001 From: Jonas Schneider Date: Mon, 11 Mar 2024 19:31:00 +0100 Subject: [PATCH] fix: only release on tag push --- .github/workflows/{docker-build.yml => release.yaml} | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) rename .github/workflows/{docker-build.yml => release.yaml} (95%) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/release.yaml similarity index 95% rename from .github/workflows/docker-build.yml rename to .github/workflows/release.yaml index 0d75da3..ec7ef3d 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/release.yaml @@ -1,14 +1,9 @@ -name: Docker Build +name: release on: push: - branches: - - "master" tags: - "v*.*.*" - pull_request: - branches: - - "master" jobs: changelog: @@ -30,6 +25,7 @@ jobs: env: OUTPUT: CHANGELOG.md - name: Uploade release changes + if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v2 with: body: ${{ steps.git-cliff.outputs.content }} @@ -44,7 +40,7 @@ jobs: git commit -m "Update changelog" git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git master - build: + build-push: needs: changelog runs-on: ubuntu-latest steps: