|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - "*.x" |
| 7 | + - "release/**" |
| 8 | + schedule: |
| 9 | + - cron: '0 10 * * *' # Once per day at 10am UTC |
| 10 | + workflow_dispatch: # Manual trigger |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + |
| 15 | +jobs: |
| 16 | + test: |
| 17 | + name: Test Against Snapshots |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 21 | + - uses: spring-io/spring-security-actions/test@4386090bf7852faa1d61782f981811441757dbb8 # main |
| 22 | + with: |
| 23 | + java-version: '25' |
| 24 | + gradle-args: -PisOverrideVersionCatalog -PtestToolchain=25 -PspringFrameworkVersion=7.+ |
| 25 | + compute-version: |
| 26 | + name: Compute Version |
| 27 | + runs-on: ubuntu-latest |
| 28 | + outputs: |
| 29 | + version: ${{ steps.project-version.outputs.version }} |
| 30 | + snapshot: ${{ steps.project-version.outputs.snapshot }} |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 33 | + - id: project-version |
| 34 | + name: Extract Project Version |
| 35 | + uses: spring-io/spring-release-actions/compute-version@a1f321783a0769dd2aea4fad6c2ae2f95a52b885 # 0.0.5 |
| 36 | + build-and-deploy: |
| 37 | + name: Build and Deploy |
| 38 | + needs: [ test, compute-version ] |
| 39 | + if: needs.compute-version.outputs.snapshot == 'true' |
| 40 | + runs-on: ubuntu-latest |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 43 | + - uses: spring-io/spring-security-actions/build@4386090bf7852faa1d61782f981811441757dbb8 # main |
| 44 | + with: |
| 45 | + java-version: '25' |
| 46 | + - id: deploy-location |
| 47 | + name: Compute Deploy Location |
| 48 | + uses: spring-io/spring-release-actions/compute-artifact-repository@a1f321783a0769dd2aea4fad6c2ae2f95a52b885 # 0.0.5 |
| 49 | + with: |
| 50 | + version: ${{ needs.compute-version.outputs.version }} |
| 51 | + - name: Deploy Artifacts |
| 52 | + uses: spring-io/spring-security-actions/ensure-artifacts@f8ef0d53fc61799c18f19bc6a4c42ccb9aa265de |
| 53 | + with: |
| 54 | + version: ${{ needs.compute-version.outputs.version }} |
| 55 | + username: ${{ secrets.ARTIFACTORY_USERNAME }} |
| 56 | + password: ${{ secrets.ARTIFACTORY_PASSWORD }} |
| 57 | + repository-uri: ${{ steps.deploy-location.outputs.uri }} |
| 58 | + repository-name: ${{ steps.deploy-location.outputs.name }} |
| 59 | + project: ${{ steps.deploy-location.outputs.project }} |
| 60 | + local-repository: build/publications/repos |
| 61 | + artifact-path: org/springframework/ldap/spring-ldap-core |
| 62 | + deploy-schema: |
| 63 | + name: Deploy Schema |
| 64 | + needs: [ test, compute-version ] |
| 65 | + if: needs.compute-version.outputs.snapshot == 'true' |
| 66 | + runs-on: ubuntu-latest |
| 67 | + steps: |
| 68 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 69 | + - uses: ./.github/actions/deploy-schema |
| 70 | + with: |
| 71 | + java-version: '25' |
| 72 | + env: |
| 73 | + DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }} |
| 74 | + DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }} |
| 75 | + DOCS_HOST: ${{ secrets.DOCS_HOST }} |
0 commit comments