Skip to content

Commit f056a17

Browse files
committed
Update release staging workflow
1 parent bb22174 commit f056a17

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/artifactory-staging.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,34 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout source code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4.2.2
1717
with:
1818
ref: '5.2.x'
1919

2020
- name: Set up JDK 17
21-
uses: actions/setup-java@v3
21+
uses: actions/setup-java@v4.7.1
2222
with:
2323
java-version: '17'
2424
distribution: 'temurin'
2525
cache: 'maven'
2626

27-
- name: Capture release version
28-
run: echo RELEASE_VERSION=${{ github.event.inputs.releaseVersion }} >> $GITHUB_ENV
29-
3027
- name: Update release version
31-
run: mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$RELEASE_VERSION
28+
run: mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.releaseVersion }}
3229

3330
- name: Enforce release rules
3431
run: mvn org.apache.maven.plugins:maven-enforcer-plugin:enforce -Drules=requireReleaseDeps
3532

36-
- name: Build with Maven and deploy to Artifactory staging repository
37-
env:
38-
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
39-
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
40-
run: mvn -P artifactory-staging -s settings.xml --batch-mode -Dmaven.test.skip=true deploy
33+
- name: Build with Maven
34+
run: mvn -DaltDeploymentRepository=local::file:deployment-repository --no-transfer-progress --batch-mode -Dmaven.test.skip=true deploy
35+
36+
- name: Deploy to Artifactory
37+
uses: spring-io/[email protected]
38+
with:
39+
uri: 'https://repo.spring.io'
40+
username: ${{ secrets.ARTIFACTORY_USERNAME }}
41+
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
42+
build-name: 'spring-batch-${{ github.event.inputs.releaseVersion }}'
43+
repository: 'libs-staging-local'
44+
folder: 'deployment-repository'
45+
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
46+
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}

0 commit comments

Comments
 (0)