1
- name : Build and deploy snapshot
1
+ name : Build and Deploy Snapshot
2
2
on :
3
3
push :
4
4
branches :
5
5
- 1.2.x
6
+ permissions :
7
+ actions : write
6
8
concurrency :
7
9
group : ${{ github.workflow }}-${{ github.ref }}
8
10
jobs :
9
- build :
10
- if : ${{ github.repository == 'spring-projects/spring-graphql' }}
11
- name : Build and deploy snapshot
11
+ build-and-deploy-snapshot :
12
+ name : Build and Deploy Snapshot
12
13
runs-on : ubuntu-latest
14
+ if : ${{ github.repository == 'spring-projects/spring-graphql' }}
13
15
steps :
14
- - name : Set up Java
15
- uses : actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
16
- with :
17
- distribution : ' liberica'
18
- java-version : 17
19
- - name : Check out code
20
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
21
- - name : Set up Gradle
22
- uses : gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
16
+ - name : Check Out Code
17
+ uses : actions/checkout@v4
18
+ - name : Build and Publish
19
+ id : build-and-publish
20
+ uses : ./.github/actions/build-and-publish
23
21
with :
24
- cache-read-only : ${{ github.ref != 'refs/heads/main' || !endsWith(github.ref, '.x') }}
25
- - name : Configure Gradle properties
26
- shell : bash
27
- run : |
28
- mkdir -p $HOME/.gradle
29
- echo 'systemProp.user.name=spring-builds+github' >> $HOME/.gradle/gradle.properties
30
- echo 'systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false' >> $HOME/.gradle/gradle.properties
31
- echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
32
- - name : Build and publish
33
- id : build
34
- env :
35
- CI : ' true'
36
- GRADLE_ENTERPRISE_URL : ' https://ge.spring.io'
37
- GRADLE_ENTERPRISE_ACCESS_KEY : ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
38
- GRADLE_ENTERPRISE_CACHE_USERNAME : ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
39
- GRADLE_ENTERPRISE_CACHE_PASSWORD : ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
40
- run : ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository build publishAllPublicationsToDeploymentRepository
22
+ develocity-access-key : ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
23
+ publish : true
41
24
- name : Deploy
42
25
uses : spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1
43
26
with :
@@ -51,11 +34,13 @@ jobs:
51
34
signing-passphrase : ${{ secrets.GPG_PASSPHRASE }}
52
35
artifact-properties : |
53
36
/**/spring-graphql-docs-*.zip::zip.name=spring-graphql,zip.type=docs,zip.deployed=false
54
- - name : Send notification
37
+ - name : Send Notification
55
38
uses : ./.github/actions/send-notification
56
39
if : always()
57
40
with :
58
41
webhook-url : ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
59
42
status : ${{ job.status }}
60
- build-scan-url : ${{ steps.build.outputs.build-scan-url }}
61
- run-name : ${{ format('{0} | Linux | Java 17', github.ref_name) }}
43
+ build-scan-url : ${{ steps.build-and-publish.outputs.build-scan-url }}
44
+ run-name : ${{ format('{0} | Linux | Java 17', github.ref_name) }}
45
+ outputs :
46
+ version : ${{ steps.build-and-publish.outputs.version }}
0 commit comments