mirror of
https://github.com/rlespinasse/github-slug-action.git
synced 2026-07-17 01:39:20 +00:00
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:
26
.github/workflows/v5-release.yml
vendored
Normal file
26
.github/workflows/v5-release.yml
vendored
Normal 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 }}
|
||||
@@ -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 }}
|
||||
Reference in New Issue
Block a user