Skip to content

Commit

Permalink
Add milestone release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fmbenhassine committed Oct 27, 2023
1 parent 6ff87c9 commit 8351111
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/artifactory-milestone-release.yml
Original file line number Diff line number Diff line change
@@ -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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up JDK 17
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 #v3.13.0
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 -s settings.xml --batch-mode -Dmaven.test.skip=true deploy

0 comments on commit 8351111

Please sign in to comment.