From ad19fc13304562908f91d75de3472bdc0b533fd6 Mon Sep 17 00:00:00 2001 From: Steve Riesenberg Date: Wed, 4 May 2022 14:05:14 -0500 Subject: [PATCH] Add workflow for scheduling releases on maintenance branches Closes gh-11180 --- .github/workflows/release-scheduler.yml | 29 +++++++++++++++++++ ...l => update-scheduled-release-version.yml} | 8 ++--- 2 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release-scheduler.yml rename .github/workflows/{release-next-version.yml => update-scheduled-release-version.yml} (95%) diff --git a/.github/workflows/release-scheduler.yml b/.github/workflows/release-scheduler.yml new file mode 100644 index 0000000000..0762c8fb69 --- /dev/null +++ b/.github/workflows/release-scheduler.yml @@ -0,0 +1,29 @@ +name: Release Scheduler + +on: + schedule: + - cron: '15 15 * * MON' # Every Monday at 3:15pm UTC + workflow_dispatch: + +jobs: + dispatch_scheduled_releases: + name: Dispatch scheduled releases + if: ${{ github.repository == 'spring-projects/spring-security' }} + strategy: + matrix: + # + # List of active maintenance branches. + # + branch: + - 'main' + - '5.8.x' + - '5.7.x' + - '5.6.x' + runs-on: ubuntu-latest + env: + TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} + steps: + - uses: actions/checkout@v2 + - uses: spring-io/spring-gradle-build-action@v1 + - name: Trigger release workflow + run: ./gradlew dispatchGitHubWorkflow -Pbranch=${{ matrix.branch }} -PworkflowId=update-scheduled-release-version.yml -PgitHubAccessToken=$TOKEN diff --git a/.github/workflows/release-next-version.yml b/.github/workflows/update-scheduled-release-version.yml similarity index 95% rename from .github/workflows/release-next-version.yml rename to .github/workflows/update-scheduled-release-version.yml index c643bbf46c..c0cd529f6f 100644 --- a/.github/workflows/release-next-version.yml +++ b/.github/workflows/update-scheduled-release-version.yml @@ -1,9 +1,7 @@ -name: Release Next Version +name: Update Scheduled Release Version on: - schedule: - - cron: '0 17 * * MON' # Every Monday at 5pm UTC - workflow_dispatch: # Manual trigger + workflow_dispatch: # Manual trigger only. Triggered by release-scheduler.yml on main. env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} @@ -12,7 +10,7 @@ env: GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} jobs: - release-next-version: + update_scheduled_release_version: name: Initiate Release If Scheduled if: ${{ github.repository == 'spring-projects/spring-security' }} runs-on: ubuntu-latest