From 4832c0b506b29e7b46a99458a6bfa1d5e73879b7 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 17:24:36 +0000 Subject: [PATCH] ci: split test and release workflows for better maintainability - Create v5-tests.yml: Runs all test jobs on push/pull_request - Create v5-release.yml: Dedicated release job with schedule and manual triggers - Remove combined v5-tests-and-release.yml workflow - Test workflow runs on every push and PR for early feedback - Release workflow runs daily at UTC midnight or on manual trigger - Clearer separation of concerns for easier maintenance --- .github/workflows/v5-release.yml | 26 ++++++++++++++ ...{v5-tests-and-release.yml => v5-tests.yml} | 36 +------------------ 2 files changed, 27 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/v5-release.yml rename .github/workflows/{v5-tests-and-release.yml => v5-tests.yml} (94%) diff --git a/.github/workflows/v5-release.yml b/.github/workflows/v5-release.yml new file mode 100644 index 0000000..a03fb44 --- /dev/null +++ b/.github/workflows/v5-release.yml @@ -0,0 +1,26 @@ +name: "[v5] Release" +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: +permissions: + contents: write + issues: write + pull-requests: write + id-token: write + packages: write +jobs: + release: + runs-on: ubuntu-latest + concurrency: + group: release-${{ github.ref }}-${{ github.event_name }} + steps: + - name: Checkout + uses: actions/checkout@v7 + - name: Release this GitHub Action + uses: cycjimmy/semantic-release-action@v4 + with: + semantic_version: 21 + branches: main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/v5-tests-and-release.yml b/.github/workflows/v5-tests.yml similarity index 94% rename from .github/workflows/v5-tests-and-release.yml rename to .github/workflows/v5-tests.yml index f7e906d..c2accb9 100644 --- a/.github/workflows/v5-tests-and-release.yml +++ b/.github/workflows/v5-tests.yml @@ -1,12 +1,7 @@ -name: "[v5] Test and Release" +name: "[v5] Test" on: push: - branches: - - main pull_request: - schedule: - - cron: '0 0 * * *' - workflow_dispatch: permissions: read-all jobs: check-v4-compatibility: @@ -386,32 +381,3 @@ jobs: [[ "${{ steps.using-nolimit-slug-max-length.outcome }}" == "success" ]] [[ "${{ steps.using-nolimit-slug-max-length.conclusion }}" == "success" ]] shell: bash - - release: - if: | - github.event_name == 'schedule' || - github.event_name == 'workflow_dispatch' || - (github.event_name == 'push' && github.ref == 'refs/heads/main') - runs-on: ubuntu-latest - permissions: - contents: write - issues: write - pull-requests: write - id-token: write - packages: write - concurrency: - group: release-${{ github.ref }}-${{ github.event_name }} - needs: - - display-without-checkout - - input-short-length-without-checkout - - input-slug-maxlength - steps: - - name: Checkout - uses: actions/checkout@v7 - - name: Release this GitHub Action - uses: cycjimmy/semantic-release-action@v4 - with: - semantic_version: 21 - branches: main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}