|
6 | 6 | concurrency: |
7 | 7 | group: ${{ github.workflow }}-${{ github.ref }} |
8 | 8 | jobs: |
9 | | - build: |
10 | | - if: ${{ github.repository == 'spring-projects/spring-restdocs' }} |
| 9 | + build-and-deploy-snapshot: |
11 | 10 | name: Build and Deploy Snapshot |
12 | 11 | runs-on: ubuntu-latest |
| 12 | + if: ${{ github.repository == 'spring-projects/spring-restdocs' }} |
13 | 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 | 14 | - name: Check Out Code |
20 | | - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
21 | | - - name: Set Up Gradle |
22 | | - uses: gradle/actions/setup-gradle@750cdda3edd6d51b7fdfc069d2e2818cf3c44f4c # v3.3.1 |
23 | | - - name: Configure Gradle Properties |
24 | | - shell: bash |
25 | | - run: | |
26 | | - mkdir -p $HOME/.gradle |
27 | | - echo 'systemProp.user.name=spring-builds+github' >> $HOME/.gradle/gradle.properties |
28 | | - echo 'systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false' >> $HOME/.gradle/gradle.properties |
29 | | - echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties |
| 15 | + uses: actions/checkout@v4 |
30 | 16 | - name: Build and Publish |
31 | | - env: |
32 | | - DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} |
33 | | - run: ./gradlew -PdeploymentRepository=$(pwd)/distribution-repository build publishAllPublicationsToDeploymentRepository |
| 17 | + id: build-and-publish |
| 18 | + uses: ./.github/actions/build |
| 19 | + with: |
| 20 | + develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} |
| 21 | + publish: true |
34 | 22 | - name: Deploy |
35 | 23 | uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1 |
36 | 24 | with: |
37 | 25 | uri: 'https://repo.spring.io' |
38 | 26 | username: ${{ secrets.ARTIFACTORY_USERNAME }} |
39 | 27 | password: ${{ secrets.ARTIFACTORY_PASSWORD }} |
40 | | - build-name: spring-restdocs |
| 28 | + build-name: 'spring-restdocs-3.0.x' |
41 | 29 | repository: 'libs-snapshot-local' |
42 | | - folder: 'distribution-repository' |
| 30 | + folder: 'deployment-repository' |
43 | 31 | signing-key: ${{ secrets.GPG_PRIVATE_KEY }} |
44 | 32 | signing-passphrase: ${{ secrets.GPG_PASSPHRASE }} |
45 | | - artifact-properties: | |
46 | | - /**/spring-restdocs-*.zip::zip.type=docs,zip.deployed=false |
| 33 | + - name: Send Notification |
| 34 | + uses: ./.github/actions/send-notification |
| 35 | + if: always() |
| 36 | + with: |
| 37 | + webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }} |
| 38 | + status: ${{ job.status }} |
| 39 | + build-scan-url: ${{ steps.build-and-publish.outputs.build-scan-url }} |
| 40 | + run-name: ${{ format('{0} | Linux | Java 17', github.ref_name) }} |
| 41 | + outputs: |
| 42 | + version: ${{ steps.build-and-publish.outputs.version }} |
0 commit comments