Skip to content

Commit fef7035

Browse files
DavidDamkeddamke
andauthored
Feature/update patch version in pipeline automatically (#130)
* add Keeptime dynamic patchversion Co-authored-by: ddamke <[email protected]>
1 parent 664d3a2 commit fef7035

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/mavenCi.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ jobs:
1818

1919
runs-on: ubuntu-latest
2020

21+
env:
22+
version: 1.2.${{ github.run_number }}
23+
2124
steps:
2225
- uses: actions/checkout@v3
2326

@@ -35,13 +38,13 @@ jobs:
3538
languages: 'java'
3639

3740
- name: Build
38-
run: mvn -V -B clean verify org.jacoco:jacoco-maven-plugin:0.8.7:prepare-agent org.jacoco:jacoco-maven-plugin:0.8.7:report -Pcoverage
41+
run: mvn -V -B clean verify org.jacoco:jacoco-maven-plugin:0.8.7:prepare-agent org.jacoco:jacoco-maven-plugin:0.8.7:report -Pcoverage -Dproject.version=${{ env.version }}-SNAPSHOT
3942

4043
- name: Upload Build Artifact
4144
uses: actions/upload-artifact@v3
4245
with:
43-
name: KeepTime
44-
path: /home/runner/work/KeepTime/KeepTime/target/keeptime-*-bin.zip
46+
name: KeepTime-${{ env.version }}
47+
path: /home/runner/work/KeepTime/KeepTime/target/*-bin.zip
4548

4649
- name: Analyze
4750
env:

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>de.doubleslash</groupId>
77
<artifactId>keeptime</artifactId>
8-
<version>1.2.0-SNAPSHOT</version>
8+
<version>${project.version}</version>
99
<packaging>jar</packaging>
1010

1111
<name>KeepTime</name>
@@ -32,6 +32,7 @@
3232
</parent>
3333

3434
<properties>
35+
<project.version>1.2.0-SNAPSHOT</project.version>
3536
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3637
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
3738
<maven.compiler.source>11</maven.compiler.source>

0 commit comments

Comments
 (0)