2024-03-23 07:30:35 +08:00
|
|
|
name: Build and Deploy Snapshot
|
2024-03-06 03:18:24 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-03-11 17:26:08 +08:00
|
|
|
- main
|
2024-03-28 05:37:13 +08:00
|
|
|
permissions:
|
|
|
|
actions: write
|
2024-03-06 03:18:24 +08:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
jobs:
|
|
|
|
build-and-deploy-snapshot:
|
2024-03-28 02:41:54 +08:00
|
|
|
name: Build and Deploy Snapshot
|
2024-05-13 19:08:15 +08:00
|
|
|
runs-on: ubuntu-latest
|
2024-03-28 03:53:07 +08:00
|
|
|
if: ${{ github.repository == 'spring-projects/spring-boot' }}
|
2024-03-06 03:18:24 +08:00
|
|
|
steps:
|
2024-04-15 22:36:36 +08:00
|
|
|
- name: Check Out Code
|
2024-03-06 03:18:24 +08:00
|
|
|
uses: actions/checkout@v4
|
2024-03-28 02:41:54 +08:00
|
|
|
- name: Build and Publish
|
2024-04-16 00:16:03 +08:00
|
|
|
id: build-and-publish
|
2024-04-15 22:36:36 +08:00
|
|
|
uses: ./.github/actions/build
|
|
|
|
with:
|
2024-04-26 16:04:20 +08:00
|
|
|
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
|
2024-04-15 22:36:36 +08:00
|
|
|
publish: true
|
2024-03-06 03:18:24 +08:00
|
|
|
- name: Deploy
|
2024-03-19 17:47:44 +08:00
|
|
|
uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1
|
2024-03-06 03:18:24 +08:00
|
|
|
with:
|
|
|
|
uri: 'https://repo.spring.io'
|
|
|
|
username: ${{ secrets.ARTIFACTORY_USERNAME }}
|
|
|
|
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
2024-03-11 19:49:57 +08:00
|
|
|
build-name: 'spring-boot-3.3.x'
|
2024-03-06 03:18:24 +08:00
|
|
|
repository: 'libs-snapshot-local'
|
|
|
|
folder: 'deployment-repository'
|
|
|
|
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
|
|
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
2024-03-28 05:30:59 +08:00
|
|
|
- name: Trigger Docs Build Workflow
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-04-15 22:40:28 +08:00
|
|
|
run: gh workflow run deploy-docs.yml -r docs-build -f build-refname=${{ github.ref_name }} -f build-version=${{ steps.build.outputs.version }}
|
2024-03-28 02:41:54 +08:00
|
|
|
- name: Send Notification
|
2024-03-06 03:18:24 +08:00
|
|
|
uses: ./.github/actions/send-notification
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
|
|
|
|
status: ${{ job.status }}
|
2024-04-16 00:16:03 +08:00
|
|
|
build-scan-url: ${{ steps.build-and-publish.outputs.build-scan-url }}
|
2024-03-11 17:38:09 +08:00
|
|
|
run-name: ${{ format('{0} | Linux | Java 17', github.ref_name) }}
|
2024-03-27 22:04:46 +08:00
|
|
|
outputs:
|
2024-04-16 00:16:03 +08:00
|
|
|
version: ${{ steps.build-and-publish.outputs.version }}
|
2024-04-15 20:32:07 +08:00
|
|
|
verify:
|
|
|
|
name: Verify
|
2024-03-27 22:04:46 +08:00
|
|
|
needs: build-and-deploy-snapshot
|
2024-04-15 21:14:36 +08:00
|
|
|
uses: ./.github/workflows/verify.yml
|
2024-04-18 19:06:31 +08:00
|
|
|
secrets:
|
|
|
|
google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
|
|
|
|
repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
|
|
|
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }}
|
|
|
|
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
2024-04-15 20:32:07 +08:00
|
|
|
with:
|
|
|
|
version: ${{ needs.build-and-deploy-snapshot.outputs.version }}
|