Skip to content

Commit

Permalink
Automate Releases
Browse files Browse the repository at this point in the history
Closes gh-856
  • Loading branch information
jzheaux committed Feb 1, 2024
1 parent 01609ed commit 6a67459
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release-scheduler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release Scheduler

on:
schedule:
- cron: '15 13 * * THU' # Every Tuesday at 13:15pm UTC
workflow_dispatch:

permissions: read-all

jobs:
dispatch_scheduled_releases:
name: Dispatch scheduled releases
if: ${{ github.repository_owner == 'spring-projects' }}
strategy:
matrix:
# List of active maintenance branches.
branch: [ main, 3.1.x, 2.4.x ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Dispatch
env:
GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
run: gh workflow run update-scheduled-release-version.yml -r ${{ matrix.branch }}
10 changes: 10 additions & 0 deletions .github/workflows/update-scheduled-release-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Update Scheduled Release Version

on:
workflow_dispatch: # Manual trigger only. Triggered by release-scheduler.yml on main.

jobs:
update-scheduled-release-version:
name: Update Scheduled Release Version
uses: spring-io/spring-security-release-tools/.github/workflows/update-scheduled-release-version.yml@v1
secrets: inherit
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ plugins {
apply plugin: 'io.spring.convention.root'
apply plugin: 'io.spring.convention.docs'
apply plugin: 'io.spring.javaformat'
apply plugin: 'io.spring.security.release'
apply plugin: 's101'

group = "org.springframework.ldap"
Expand Down Expand Up @@ -49,14 +50,21 @@ antora {
options = [clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true]
}



tasks.named("generateAntoraYml") {
asciidocAttributes = project.provider( {
return ['project-version': project.version]
} )
}

springRelease {
repositoryOwner = "spring-projects"
repositoryName = "spring-ldap"
weekOfMonth = 2
dayOfWeek = 4
referenceDocUrl = "https://docs.spring.io/spring-ldap/reference/{version}/index.html"
apiDocUrl = "https://docs.spring.io/spring-ldap/docs/{version}/api/"
replaceSnapshotVersionInReferenceDocUrl = true
}

s101 {
configurationDirectory = project.file("etc/s101")
Expand Down
1 change: 1 addition & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ dependencies {
implementation 'com.github.ben-manes:gradle-versions-plugin:0.38.0'
implementation 'com.github.spullara.mustache.java:compiler:0.9.4'
implementation 'io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.15'
implementation 'io.spring.gradle:spring-security-release-plugin:1.0.1'
implementation 'io.spring.nohttp:nohttp-gradle:0.0.10'
implementation 'net.sourceforge.htmlunit:htmlunit:2.37.0'
implementation 'org.asciidoctor:asciidoctor-gradle-jvm:3.3.2'
Expand Down

0 comments on commit 6a67459

Please sign in to comment.