From ec55b8bb911323fefe7fbe7d76c05d2559d0877d Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Mon, 15 Jul 2024 20:42:49 +0100 Subject: [PATCH] Only create release if changes have been made --- .github/workflows/create-release.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 5c0c233..4e14b33 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -14,15 +14,24 @@ jobs: release_name: ${{ steps.tag_version.outputs.new_tag }} steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Changes Since Last Tag + id: changes + uses: jsmith/changes-since-last-tag@v0.4.1 - name: Bump version and push tag + if: steps.changes.outputs.any_changed == 'true' id: tag_version uses: mathieudutour/github-tag-action@v6.2 with: github_token: ${{ secrets.GITHUB_TOKEN }} - default_bump: minor + # default_bump: minor + default_bump: false - name: Create a GitHub release + if: steps.changes.outputs.any_changed == 'true' uses: ncipollo/release-action@v1 with: tag: ${{ steps.tag_version.outputs.new_tag }}