Artifactory Staging #18
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: Artifactory Staging | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseVersion: | |
description: "Release version" | |
required: true | |
jobs: | |
build: | |
name: Stage release to Artifactory | |
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: mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.releaseVersion }} | |
- name: Enforce release rules | |
run: mvn org.apache.maven.plugins:maven-enforcer-plugin:enforce -Drules=requireReleaseDeps | |
- name: Build with Maven | |
run: mvn -DaltDeploymentRepository=local::file:deployment-repository --no-transfer-progress --batch-mode -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-batch-${{ github.event.inputs.releaseVersion }}' | |
repository: 'libs-staging-local' | |
folder: 'deployment-repository' | |
signing-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }} |