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
This commit is contained in:
Claude
2026-07-06 17:24:36 +00:00
parent ffad7e3eb7
commit 4832c0b506
2 changed files with 27 additions and 35 deletions

26
.github/workflows/v5-release.yml vendored Normal file
View File

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

View File

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