1
+ name : Build and deploy snapshot
2
+ on :
3
+ push :
4
+ branches :
5
+ - 1.2.x
6
+ concurrency :
7
+ group : ${{ github.workflow }}-${{ github.ref }}
8
+ jobs :
9
+ build :
10
+ if : ${{ github.repository == 'spring-projects/spring-graphql' }}
11
+ name : Build and deploy snapshot
12
+ runs-on : ubuntu-latest
13
+ 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
23
+ 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 -PdistributionRepository=$(pwd)/deployment-repository build publishAllPublicationsToDistributionRepository
41
+ - name : Deploy
42
+ uses : spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1
43
+ with :
44
+ uri : ' https://repo.spring.io'
45
+ username : ${{ secrets.ARTIFACTORY_USERNAME }}
46
+ password : ${{ secrets.ARTIFACTORY_PASSWORD }}
47
+ build-name : ${{ format('spring-graphql-{0}', github.ref_name)}}
48
+ repository : ' libs-snapshot-local'
49
+ folder : ' deployment-repository'
50
+ signing-key : ${{ secrets.GPG_PRIVATE_KEY }}
51
+ signing-passphrase : ${{ secrets.GPG_PASSPHRASE }}
52
+ artifact-properties : |
53
+ /**/spring-graphql-docs-*.zip::zip.name=spring-graphql,zip.displayname=Spring for GraphQL,zip.type:docs,zip.deployed=false
54
+ - name : Send notification
55
+ uses : ./.github/actions/send-notification
56
+ if : always()
57
+ with :
58
+ webhook-url : ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
59
+ status : ${{ job.status }}
60
+ build-scan-url : ${{ steps.build.outputs.build-scan-url }}
61
+ run-name : ${{ format('{0} | Linux | Java 17', github.ref_name) }}
0 commit comments