Automate Releases

Closes gh-856
This commit is contained in:
Josh Cummings
2024-02-01 12:10:03 -07:00
parent 01609eda79
commit 6a67459654
4 changed files with 48 additions and 2 deletions

27
.github/workflows/release-scheduler.yml vendored Normal file
View File

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

View File

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

View File

@@ -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"
@@ -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")

View File

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