diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index fba0c28..7a58012 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -1,18 +1,19 @@ # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path +# https://stackoverflow.com/questions/58879480/how-to-automate-versioning-of-maven-project-in-github -name: Maven Package +name: Publish maven package to Github Packages -on: - push: - tags: - - '*' +# on: +# push: +# tags: +# - '*' # on: # push: # branches: [main] -#on: -# release: -# types: [created] +on: + release: + types: [created] jobs: build: @@ -31,7 +32,10 @@ jobs: distribution: 'temurin' server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file - + - if: github.event.release + name: Update version in pom.xml (Release only) + run: mvn -B versions:set -DnewVersion=${{ github.event.release.tag_name }} -DgenerateBackupPoms=false + - - name: Build with Maven run: mvn -B package --file pom.xml diff --git a/CHANGELOG b/CHANGELOG index d0a9f01..794ffb7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.9.9] - 2022-06-18 +### Changed +- automated github release build + ## [0.9.8] - 2022-06-14 ### Fixed - uptake dependency-check-maven 7.1.1 diff --git a/README.md b/README.md index d90fbf0..e73d5da 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ https://github.com/javamelody/javamelody/wiki * check dependent libraries for updates * run tests and build +## Release +* create a tag with version number +* create a github release + ## Installation * rename target/fop4apex*.war to fop4apex.war * copy fop4apex.war to tomcat webapps folder diff --git a/pom.xml b/pom.xml index 0282ca1..52a8ce2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ de.pdv.apex fop4apex - 0.9.8 + 0.9.9-SNAPSHOT fop4apex war https://www.pdv.de