Only create release if changes have been made

This commit is contained in:
Luke Tainton 2024-07-15 20:42:49 +01:00
parent 5fe842f297
commit ec55b8bb91
No known key found for this signature in database

View File

@ -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 }}