Skip to content

Commit

Permalink
Adding revision number to publish.yml to mary tag and package version
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Otzen committed Jan 11, 2022
1 parent 20fcda8 commit b285c05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Publish package
run: mvn --batch-mode --no-transfer-progress deploy
run: mvn --batch-mode --no-transfer-progress -Drevision=$RELEASE_VERSION deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

<groupId>org.maibornwolff</groupId>
<artifactId>validation</artifactId>
<version>1.0-SNAPSHOT</version>
<version>${revision}</version>

<properties>
<revision>1.0.0</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
Expand Down

0 comments on commit b285c05

Please sign in to comment.