From cd351f600a65b19ff077e30905e5b321b7559c1e Mon Sep 17 00:00:00 2001 From: Tyler Carrol Date: Mon, 2 Dec 2024 21:42:54 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feature:=20Update=20Changelog=20Cha?= =?UTF-8?q?nged=20to=20Skip=20if=20Not=20Incrementing=20Version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/changelog-changed.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog-changed.yml b/.github/workflows/changelog-changed.yml index dc1c135..4288c32 100644 --- a/.github/workflows/changelog-changed.yml +++ b/.github/workflows/changelog-changed.yml @@ -24,6 +24,8 @@ on: - reopened - synchronize - ready_for_review + - labeled + - unlabeled # Trigger if target branch was changed to a trunk pull_request_target: types: @@ -55,12 +57,27 @@ jobs: token: ${{ secrets.TJC_TOKEN || secrets.GITHUB_TOKEN }} # Check for Changes in Changelog + # Or skip if there is no major, minor, or patch label - name: Check for Changes to Changelog id: getChanges - uses: tj-actions/changed-files@v45.0.3 + if: | + contains(github.event.label.name, 'major') || + contains(github.event.label.name, 'minor') || + contains(github.event.label.name, 'patch') + uses: tj-actions/changed-files@v45.0.4 with: files: CHANGELOG.md + # Report Skipped + - name: Skipped - Version Not Changed + if: | + !contains(github.event.label.name, 'major') && + !contains(github.event.label.name, 'minor') && + !contains(github.event.label.name, 'patch') + uses: ./.github/actions/tools/annotation/notice + with: + message: "[Skipped] Version Not Changed" + # Report Success - name: Success - Changelog Changed if: steps.getChanges.outputs.any_modified == 'true' @@ -70,7 +87,7 @@ jobs: # Report Failure - name: Failure - Changelog Not Changed - if: steps.getChanges.outputs.any_modified != 'true' + if: steps.getChanges.outputs.any_modified == 'false' uses: ./.github/actions/tools/exit-code with: code: 5