Skip to content

Commit

Permalink
Added maven releaseplugin and corresponding GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbehr801 authored and lwluc committed Nov 3, 2023
1 parent a15a6e2 commit 5467efc
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: release version

on:
workflow_dispatch:
inputs:
releaseVersion:
description: the release version
required: true
type: String
developmentVersion:
description: the next dev iteration version
required: true
type: String

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
- name: Configure Git User
run: |
git config user.email "[email protected]"
git config user.name "ReleaseAction[bot]"
- name: Release
run: ./mvnw -B release:clean release:prepare -DreleaseVersion=$RELEASE_VERSION -DdevelopmentVersion=$DEV_VERSION
env:
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
DEV_VERSION: ${{ github.event.inputs.developmentVersion }}
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@
<properties>
<java.version>17</java.version>
<kotlin.version>1.9.10</kotlin.version>
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
<project.scm.url>https://github.com/envite-consulting/optimize-to-xes.git</project.scm.url>
</properties>

<scm>
<connection>scm:git:${project.scm.url}</connection>
<developerConnection>scm:git:${project.scm.url}</developerConnection>
<url>${project.scm.url}</url>
<tag>HEAD</tag>
</scm>

<distributionManagement>
<repository>
<id>github</id>
Expand Down Expand Up @@ -148,6 +157,16 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<configuration>
<tag>v${releaseVersion}</tag>
<scmReleaseCommitComment>Release v${releaseVersion}</scmReleaseCommitComment>
<scmDevelopmentCommitComment>prepare for next development iteration</scmDevelopmentCommitComment>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 5467efc

Please sign in to comment.