Spring Batch Extension Stage #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Spring Batch Extension Stage | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| extension: | |
| description: "Extension name" | |
| required: true | |
| type: choice | |
| options: | |
| - spring-batch-bigquery | |
| - spring-batch-excel | |
| - spring-batch-elasticsearch | |
| - spring-batch-neo4j | |
| - spring-batch-notion | |
| releaseVersion: | |
| description: "Release version" | |
| required: true | |
| javaVersion: | |
| description: "Java version" | |
| required: true | |
| type: choice | |
| options: | |
| - '17' | |
| - '25' | |
| jobs: | |
| build: | |
| name: Build an extension | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
| with: | |
| repository: 'spring-projects/spring-batch-extensions' | |
| ref: 'main' | |
| - name: Set up JDK ${{ github.event.inputs.javaVersion }} | |
| uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 | |
| with: | |
| java-version: '${{ github.event.inputs.javaVersion }}' | |
| distribution: 'temurin' | |
| - name: Update release version | |
| run: ./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.releaseVersion }} | |
| working-directory: ${{ github.event.inputs.extension }} | |
| - name: Enforce release rules | |
| run: ./mvnw org.apache.maven.plugins:maven-enforcer-plugin:enforce -Drules=requireReleaseDeps | |
| working-directory: ${{ github.event.inputs.extension }} | |
| - name: Build with Maven | |
| run: ./mvnw -DaltDeploymentRepository=local::file:deployment-repository --no-transfer-progress --batch-mode -Dmaven.test.skip=true deploy | |
| working-directory: ${{ github.event.inputs.extension }} | |
| - name: Deploy to Artifactory | |
| uses: spring-io/[email protected] | |
| with: | |
| uri: 'https://repo.spring.io' | |
| username: ${{ secrets.ARTIFACTORY_USERNAME }} | |
| password: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
| build-name: '${{ github.event.inputs.extension }}-${{ github.event.inputs.releaseVersion }}' | |
| repository: 'libs-staging-local' | |
| folder: '${{ github.event.inputs.extension }}/deployment-repository' | |
| signing-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| signing-passphrase: ${{ secrets.GPG_PASSPHRASE }} |