Stage Release in Artifactory #4
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: Stage Release in Artifactory | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| releaseVersion: | |
| description: "Version to stage" | |
| required: true | |
| jobs: | |
| stage-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/[email protected] | |
| - name: Set up JDK 17 | |
| uses: actions/[email protected] | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Update release version | |
| run: ./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.releaseVersion }} | |
| - name: Enforce release rules | |
| run: ./mvnw org.apache.maven.plugins:maven-enforcer-plugin:enforce -Drules=requireReleaseDeps | |
| - name: Build with Maven | |
| run: ./mvnw -DaltDeploymentRepository=local::file:deployment-repository --no-transfer-progress --batch-mode --update-snapshots -Dmaven.test.skip=true deploy | |
| - 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: 'spring-shell-${{ github.event.inputs.releaseVersion }}' | |
| repository: 'libs-staging-local' | |
| folder: 'deployment-repository' | |
| signing-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| signing-passphrase: ${{ secrets.GPG_PASSPHRASE }} |