3
3
release :
4
4
types : [published]
5
5
jobs :
6
- release :
6
+ publish :
7
+ outputs :
8
+ release_version : ${{ steps.release_version.outputs.value }}
7
9
runs-on : ubuntu-latest
8
- strategy :
9
- matrix :
10
- java : ['8']
11
10
env :
12
11
GIT_USER_NAME : puneetbehl
13
- GIT_USER_EMAIL : behlp@objectcomputing.com
12
+ GIT_USER_EMAIL : behlp@unityfoundation.io
14
13
steps :
15
14
- name : Checkout repository
16
15
uses : actions/checkout@v4
17
16
with :
18
17
token : ${{ secrets.GH_TOKEN }}
19
- - uses : gradle/wrapper-validation-action@v1
20
18
- name : Set up JDK
21
19
uses : actions/setup-java@v4
22
20
with :
23
21
distribution : ' adopt'
24
- java-version : ${{ matrix.java }}
22
+ java-version : ' 8 '
25
23
- name : Set the current release version
26
24
id : release_version
27
- run : echo ::set-output name=release_version:: ${GITHUB_REF:11}
25
+ run : echo "value= ${GITHUB_REF:11}" >> $GITHUB_OUTPUT
28
26
- name : Run pre-release
29
27
uses : micronaut-projects/github-actions/pre-release@master
30
28
with :
31
29
token : ${{ secrets.GITHUB_TOKEN }}
30
+ - name : Run Assemble
31
+ if : success()
32
+ id : assemble
33
+ uses : gradle/gradle-build-action@v2
34
+ with :
35
+ arguments : assemble
36
+ env :
37
+ GRADLE_ENTERPRISE_ACCESS_KEY : ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
38
+ GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
39
+ GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
40
+ - name : Upload Distribution
41
+ if : success()
42
+ uses : actions/upload-artifact@v4
43
+ with :
44
+ name : spring-security-cas-${{ steps.release_version.outputs.value }}.jar
45
+ path : build/distributions/spring-security-cas-${{ steps.release_version.outputs.value }}-plain.jar
32
46
- name : Generate secring file
33
47
env :
34
48
SECRING_FILE : ${{ secrets.SECRING_FILE }}
37
51
id : publish
38
52
uses : gradle/gradle-build-action@v2
39
53
env :
54
+ GRADLE_ENTERPRISE_ACCESS_KEY : ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
55
+ GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
56
+ GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
40
57
SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
41
58
SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
42
59
SONATYPE_NEXUS_URL : ${{ secrets.SONATYPE_NEXUS_URL }}
@@ -45,32 +62,78 @@ jobs:
45
62
SIGNING_PASSPHRASE : ${{ secrets.SIGNING_PASSPHRASE }}
46
63
SECRING_FILE : ${{ secrets.SECRING_FILE }}
47
64
with :
48
- arguments : -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository
49
- - name : Publish Documentation
65
+ arguments : |
66
+ -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
67
+ publishToSonatype
68
+ closeSonatypeStagingRepository
69
+ release :
70
+ needs : publish
71
+ runs-on : ubuntu-latest
72
+ permissions :
73
+ contents : read
74
+ steps :
75
+ - uses : actions/checkout@v4
76
+ - name : Set up JDK
77
+ uses : actions/setup-java@v4
78
+ with :
79
+ distribution : ' adopt'
80
+ java-version : ' 8'
81
+ - name : Checkout repository
82
+ uses : actions/checkout@v4
83
+ with :
84
+ token : ${{ secrets.GH_TOKEN }}
85
+ ref : v${{ needs.publish.outputs.release_version }}
86
+ - name : Nexus Staging Close And Release
87
+ uses : gradle/gradle-build-action@v2
88
+ env :
89
+ GRADLE_ENTERPRISE_ACCESS_KEY : ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
90
+ GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
91
+ GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
92
+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
93
+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
94
+ SONATYPE_STAGING_PROFILE_ID : ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
95
+ with :
96
+ arguments : |
97
+ findSonatypeStagingRepository
98
+ releaseSonatypeStagingRepository
99
+ - name : Run post-release
100
+ if : success()
101
+ uses : micronaut-projects/github-actions/post-release@master
102
+ with :
103
+ token : ${{ secrets.GITHUB_TOKEN }}
104
+ env :
105
+ SNAPSHOT_SUFFIX : -SNAPSHOT
106
+ docs :
107
+ needs : publish
108
+ runs-on : ubuntu-latest
109
+ permissions :
110
+ contents : write
111
+ steps :
112
+ - name : Set up JDK
113
+ uses : actions/setup-java@v4
114
+ with :
115
+ distribution : ' adopt'
116
+ java-version : ' 8'
117
+ - name : Checkout repository
118
+ uses : actions/checkout@v4
119
+ with :
120
+ token : ${{ secrets.GH_TOKEN }}
121
+ ref : v${{ needs.publish.outputs.release_version }}
122
+ - name : Build Documentation
50
123
id : docs
51
- if : steps.publish.outcome == 'success'
52
124
uses : gradle/gradle-build-action@v2
53
125
with :
54
126
arguments : docs:docs
55
- - name : Export Gradle Properties
56
- uses : micronaut-projects/github-actions/export-gradle-properties@master
57
127
- name : Publish to Github Pages
58
- if : steps.docs.outcome == ' success'
59
- uses : micronaut-projects /github-pages-deploy-action@master
128
+ if : success()
129
+ uses : grails /github-pages-deploy-action@v2
60
130
env :
61
- BETA : ${{ contains(steps.release_version .outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC ') }}
131
+ SKIP_LATEST : ${{ contains(needs.publish .outputs.release_version, 'M') }}
62
132
TARGET_REPOSITORY : ${{ github.repository }}
63
133
GH_TOKEN : ${{ secrets.GH_TOKEN }}
64
134
BRANCH : gh-pages
65
135
FOLDER : docs/build/docs
66
136
DOC_FOLDER : gh-pages
67
- COMMIT_EMAIL : behlp@objectcomputing.com
137
+ COMMIT_EMAIL : behlp@unityfoundation.io
68
138
COMMIT_NAME : Puneet Behl
69
- VERSION : ${{ steps.release_version.outputs.release_version }}
70
- - name : Run post-release
71
- if : steps.publish.outcome == 'success' && steps.docs.outcome == 'success' && success()
72
- uses : micronaut-projects/github-actions/post-release@master
73
- with :
74
- token : ${{ secrets.GITHUB_TOKEN }}
75
- env :
76
- SNAPSHOT_SUFFIX : -SNAPSHOT
139
+ VERSION : ${{ needs.publish.outputs.release_version }}
0 commit comments