Skip to content

Commit a612e58

Browse files
committed
Updated Workflows
1 parent 41ac9a9 commit a612e58

File tree

6 files changed

+261
-17
lines changed

6 files changed

+261
-17
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "003A: Announce Release"
2+
on:
3+
milestone:
4+
types: [ closed ]
5+
6+
jobs:
7+
announce-release:
8+
name: "Announce ${{ github.event.milestone.title }} Release"
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Announce Release on GChat
12+
uses: jzheaux/spring-io-actions/announce-on-gchat@main
13+
with:
14+
version: ${{ github.event.milestone.title }}
15+
gchat-webhook-url: ${{ secrets.GCHAT_WEBHOOK_URL }}

.github/workflows/ci.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: "001: CI"
2+
3+
on:
4+
workflow_dispatch: # Manual trigger
5+
6+
env:
7+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v5
15+
- uses: jzheaux/spring-io-actions/run-gradle@main
16+
with:
17+
java-version: 17
18+
distribution: temurin
19+
gradle-args: 'build publishAllPublicationsToLocalRepository --continue'
20+
- name: Upload build artifacts
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: build-output
24+
path: |
25+
build/publications/repos
26+
test:
27+
name: Test Against Snapshots
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v5
31+
- uses: jzheaux/spring-io-actions/run-gradle@main
32+
with:
33+
java-version: 17
34+
distribution: temurin
35+
gradle-args: "test --refresh-dependencies -PforceMavenRepositories=snapshot -PisOverrideVersionCatalog -PtestToolchain=17 -PspringFrameworkVersion=7.+ -PspringDataVersion=2025.0.+ --stacktrace"
36+
deploy:
37+
name: Plan Deployment
38+
runs-on: ubuntu-latest
39+
needs: [ build, test ]
40+
outputs:
41+
branch-name: ${{ steps.branch-name.outputs.branch }}
42+
version: ${{ steps.compute-version.outputs.version }}
43+
repository: ${{ steps.compute-artifact-repository.outputs.repository }}
44+
steps:
45+
- uses: actions/checkout@v5
46+
- id: compute-version
47+
name: Compute Version
48+
uses: jzheaux/spring-io-actions/compute-version@main
49+
- id: branch-name
50+
name: Extract Branch Name
51+
env:
52+
BRANCH: ${{ github.ref_name }}
53+
VERSION: ${{ steps.compute-version.outputs.version }}
54+
run: |
55+
branch=$BRANCH
56+
if [[ "$branch" = "main" ]] ; then
57+
branch="${VERSION%.*}.x"
58+
fi
59+
echo "branch=$branch" >> $GITHUB_OUTPUT
60+
- id: compute-artifact-repository
61+
name: Compute Artifact Repository
62+
uses: jzheaux/spring-io-actions/compute-artifact-repository@main
63+
with:
64+
version: ${{ steps.compute-version.outputs.version }}
65+
- name: Download build artifacts
66+
uses: actions/download-artifact@v4
67+
with:
68+
name: build-output
69+
path: local-repository
70+
- if: ${{ needs.plan-deploy.outputs.repository != 'central' }}
71+
uses: spring-io/artifactory-deploy-action@8226ab8d9f94ac2dbef2c2584526d172dc030b3e
72+
with:
73+
uri: 'https://repo.spring.io'
74+
repository: ${{ steps.compute-artifact-repository.outputs.repository }}
75+
username: ${{ secrets.ARTIFACTORY_USERNAME }}
76+
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
77+
build-name: ${{ github.event.repository.name }}-${{ needs.plan-deploy.outputs.branch }}
78+
build-number: ${{ github.run_id }}
79+
build-uri: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
80+
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
81+
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}
82+
vcs-revision: ${{ github.sha }}
83+
folder: local-repository
84+
- if: ${{ steps.compute-artifact-repository.outputs.repository == 'central' }}
85+
uses: spring-io/central-publish-action@7f15aea591fe04ea7500dcdd753536f7e59ee601
86+
with:
87+
token-name: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
88+
token: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
89+
dir: local-repository
90+
publish:
91+
name: Publish Release
92+
needs: deploy
93+
uses: ./.github/workflows/publish-release.yml
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "002: Check For Releases"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
9+
jobs:
10+
planner:
11+
name: "Is there a release that is ready today?"
12+
runs-on: ubuntu-latest
13+
outputs:
14+
release-version: ${{ steps.release-version.outputs.release-version }}
15+
should-release: ${{ steps.count-issues.outputs.issue-count > 0 }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- id: compute-version
19+
uses: jzheaux/spring-io-actions/compute-version@main
20+
- if: ${{ steps.compute-version.outputs.snapshot == 'true' }}
21+
id: release-version
22+
uses: jzheaux/spring-io-actions/get-todays-release-version@main
23+
with:
24+
snapshot-version: ${{ steps.compute-version.outputs.snapshot }}
25+
milestone-token: ${{ secrets.GITHUB_TOKEN }}
26+
- if: ${{ steps.release-version.outputs.release-version != '' }}
27+
id: count-issues
28+
uses: jzheaux/spring-io-actions/count-open-issues@main
29+
with:
30+
milestone: ${{ steps.release-version.outputs.release-version }}
31+
32+
release-launcher:
33+
needs: planner
34+
if: ${{ needs.planner.outputs.should-release == 'true' }}
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: "Push Release Version ${{ needs.planner.outputs.release-version }}"
38+
uses: jzheaux/spring-io-actions/push-release-version@main
39+
with:
40+
version: ${{ needs.planner.outputs.release-version }}
Lines changed: 53 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,57 @@
1-
name: Publish Release
1+
permissions:
2+
issues: write
3+
contents: write
24

5+
name: "003: Publish Release"
36
on:
4-
workflow_dispatch: # Manual trigger
5-
inputs:
6-
version:
7-
description: "The release to publish"
8-
required: true
7+
workflow_dispatch:
8+
9+
env:
10+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
911

1012
jobs:
11-
perform-release:
12-
name: Perform Release
13-
uses: spring-io/spring-security-release-tools/.github/workflows/perform-release.yml@v1
14-
with:
15-
should-perform-release: true
16-
project-version: ${{ inputs.version }}
17-
milestone-repo-url: https://repo1.maven.org/maven2
18-
release-repo-url: https://repo1.maven.org/maven2
19-
artifact-path: org/springframework/ldap/spring-ldap-core
20-
slack-announcing-id: spring-ldap-announcing
21-
secrets: inherit
13+
planner:
14+
name: Should Publish Release?
15+
runs-on: ubuntu-latest
16+
outputs:
17+
version: ${{ steps.project-version.outputs.version }}
18+
snapshot: ${{ steps.project-version.outputs.snapshot }}
19+
steps:
20+
- name: "Checkout ${{ github.repository }}"
21+
uses: actions/checkout@v5
22+
- id: project-version
23+
name: Extract Project Version
24+
uses: jzheaux/spring-io-actions/compute-version@main
25+
publish-release:
26+
name: Publish Release
27+
runs-on: ubuntu-latest
28+
needs: planner
29+
if: ${{ needs.planner.outputs.snapshot == 'false' }}
30+
steps:
31+
- name: "Checkout ${{ github.repository }}"
32+
uses: actions/checkout@v5
33+
- name: Generate Changelog
34+
uses: spring-io/github-changelog-generator@v0.0.12
35+
with:
36+
milestone: ${{ needs.planner.outputs.version }}
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
config-file: scripts/release/release-notes-sections.yml
39+
- name: Publish Changelog
40+
uses: jzheaux/spring-io-actions/publish-release-notes@main
41+
with:
42+
tag: ${{ needs.planner.outputs.version }}
43+
- name: Generate GitHub App Token
44+
id: generate-token
45+
uses: actions/create-github-app-token@v1
46+
with:
47+
app-id: ${{ secrets.MILESTONE_CLOSER_APP_ID }}
48+
private-key: ${{ secrets.MILESTONE_CLOSER_PRIVATE_KEY }}
49+
- name: Close Release Milestone
50+
uses: jzheaux/spring-io-actions/close-milestone@main
51+
with:
52+
version: ${{ needs.planner.outputs.version }}
53+
token: ${{ steps.generate-token.outputs.token }}
54+
- name: Update Version
55+
uses: jzheaux/spring-io-actions/push-next-development-version@main
56+
with:
57+
version: ${{ needs.planner.outputs.version }}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
permissions:
2+
issues: write
3+
name: "003B: Schedule Milestones"
4+
on:
5+
milestone:
6+
types: [ closed ]
7+
8+
jobs:
9+
schedule-milestones:
10+
name: Schedule Milestones
11+
runs-on: ubuntu-latest
12+
steps:
13+
- id: next-release-milestone
14+
name: "Compute Milestone After ${{ github.event.milestone.title }}"
15+
uses: jzheaux/spring-io-actions/compute-next-version@main
16+
with:
17+
version: ${{ github.event.milestone.title }}
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
website-token: ${{ secrets.WEBSITE_TOKEN }}
20+
website-repository: 'jzheaux/jzheaux-website-content'
21+
- name: "Ensure ${{ steps.next-release-milestone.outputs.next-version }} Scheduled"
22+
uses: jzheaux/spring-io-actions/schedule-milestone@main
23+
if: ${{ steps.next-release-milestone.outputs.release-type == 'oss' }}
24+
with:
25+
version: ${{ steps.next-release-milestone.outputs.next-version }}
26+
version-date: ${{ steps.next-release-milestone.outputs.next-version-date }}
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
- id: next-next-release-milestone
29+
name: "Compute Milestone After ${{ steps.next-release-milestone.outputs.next-version }}"
30+
uses: jzheaux/spring-io-actions/compute-next-version@main
31+
if: ${{ steps.next-release-milestone.outputs.next-version-type == 'oss' }}
32+
with:
33+
version: ${{ steps.next-release-milestone.outputs.next-version }}
34+
token: ${{ secrets.GITHUB_TOKEN }}
35+
website-token: ${{ secrets.WEBSITE_TOKEN }}
36+
website-repository: 'jzheaux/jzheaux-website-content'
37+
- name: "Ensure ${{ steps.next-next-release-milestone.outputs.next-version-type }} Scheduled"
38+
uses: jzheaux/spring-io-actions/schedule-milestone@main
39+
if: ${{ steps.next-next-release-milestone.outputs.next-version-type == 'oss' }}
40+
with:
41+
version: ${{ steps.next-next-release-milestone.outputs.next-version }}
42+
version-date: ${{ steps.next-next-release-milestone.outputs.next-version-date }}
43+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
permissions:
2+
contents: write
3+
name: "003C: Update Learn Page"
4+
on:
5+
milestone:
6+
types: [ closed ]
7+
8+
jobs:
9+
update-learn-page:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Update Learn Page
13+
uses: jzheaux/spring-io-actions/update-learn-page@main
14+
with:
15+
version: ${{ github.event.milestone.title }}
16+
website-token: ${{ secrets.WEBSITE_TOKEN }}
17+
website-repository: 'jzheaux/jzheaux-website-content'

0 commit comments

Comments
 (0)