Add github action for milestone repo release
This commit is contained in:
parent
98eee0111d
commit
44c8fb0080
2 changed files with 50 additions and 0 deletions
38
.github/workflows/artifactory-milestone-release.yml
vendored
Normal file
38
.github/workflows/artifactory-milestone-release.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
name: Artifactory Milestone Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
releaseVersion:
|
||||||
|
description: "Milestone release version"
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Release milestone to Artifactory
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout source code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
|
cache: 'maven'
|
||||||
|
|
||||||
|
- name: Capture release version
|
||||||
|
run: echo RELEASE_VERSION=${{ github.event.inputs.releaseVersion }} >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Update release version
|
||||||
|
run: mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$RELEASE_VERSION
|
||||||
|
|
||||||
|
- name: Enforce release rules
|
||||||
|
run: mvn org.apache.maven.plugins:maven-enforcer-plugin:enforce -Drules=requireReleaseDeps
|
||||||
|
|
||||||
|
- name: Build with Maven and deploy to Artifactory's milestone repository
|
||||||
|
env:
|
||||||
|
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||||
|
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||||
|
run: mvn -P artifactory-milestone -P javadoc -s settings.xml --batch-mode -Dmaven.test.skip=true deploy
|
||||||
12
pom.xml
12
pom.xml
|
|
@ -291,6 +291,18 @@
|
||||||
</snapshots>
|
</snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
<profile>
|
||||||
|
<id>artifactory-milestone</id>
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
</profile>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue