From 767c27eb09703647a853eb0a6bf1793bb46579b3 Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson Date: Sat, 27 Apr 2024 00:55:20 +1000 Subject: [PATCH 1/4] ci: Don't make a release if there's no changes worth releasing. --- .github/workflows/tag-new-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tag-new-release.yml b/.github/workflows/tag-new-release.yml index f5be0999c..05945fae4 100644 --- a/.github/workflows/tag-new-release.yml +++ b/.github/workflows/tag-new-release.yml @@ -13,3 +13,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} create_annotated_tag: true custom_release_rules: ci:none,chore:none,style:none + default_bump: none From ba7a888cb9c305ef4549648fb648bd6e30e2e2f0 Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson Date: Sat, 27 Apr 2024 00:58:49 +1000 Subject: [PATCH 2/4] ci: Dry-run the workflow unless manually or scheduled run. --- .github/workflows/tag-new-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tag-new-release.yml b/.github/workflows/tag-new-release.yml index 05945fae4..006d10bd0 100644 --- a/.github/workflows/tag-new-release.yml +++ b/.github/workflows/tag-new-release.yml @@ -14,3 +14,4 @@ jobs: create_annotated_tag: true custom_release_rules: ci:none,chore:none,style:none default_bump: none + dry_run: ${{ github.event_name != 'workflow_dispatch' && github.event_name != 'schedule' }} From 25acf1e57bb6f9125b8bfca7c80be03bb0576287 Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson Date: Sat, 27 Apr 2024 00:59:57 +1000 Subject: [PATCH 3/4] ci: Execute the tag workflow every sunday at 5:30 and on pull requests. --- .github/workflows/tag-new-release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tag-new-release.yml b/.github/workflows/tag-new-release.yml index 006d10bd0..ac903cbbc 100644 --- a/.github/workflows/tag-new-release.yml +++ b/.github/workflows/tag-new-release.yml @@ -1,7 +1,10 @@ name: tag new release on: + pull_request: # for testing workflow_dispatch: + schedule: + - cron: "30 5 * * 0" jobs: tag: From c365c4dc732b59b698680d9d5399f5296991c763 Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson Date: Sat, 27 Apr 2024 01:09:19 +1000 Subject: [PATCH 4/4] ci: continue-on-error if no new release --- .github/workflows/tag-new-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tag-new-release.yml b/.github/workflows/tag-new-release.yml index ac903cbbc..f945089a1 100644 --- a/.github/workflows/tag-new-release.yml +++ b/.github/workflows/tag-new-release.yml @@ -12,6 +12,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: mathieudutour/github-tag-action@v6.2 + continue-on-error: true # ok to not make a new tag with: github_token: ${{ secrets.GITHUB_TOKEN }} create_annotated_tag: true