diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml
index a04e79b..694f3a7 100644
--- a/.github/workflows/maven-release.yml
+++ b/.github/workflows/maven-release.yml
@@ -32,6 +32,9 @@ jobs:
- id: install-secret-key
name: Install gpg secret key
run: cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
+
+ - name: Change version to tag name
+ run: mvn versions:set -DnewVersion="${{ github.event.release.tag_name }}"
- name: Unit test
run: mvn -B --file pom.xml clean test -P test
diff --git a/.github/workflows/pull-tests.yml b/.github/workflows/pull-tests.yml
new file mode 100644
index 0000000..708aa1c
--- /dev/null
+++ b/.github/workflows/pull-tests.yml
@@ -0,0 +1,37 @@
+name: Maven Package Energyml-utils
+
+on:
+ pull_request:
+ branches: main
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ permissions:
+ contents: read
+ packages: write
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+ gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
+ gpg-passphrase: MAVEN_GPG_PASSPHRASE
+
+ - id: install-secret-key
+ name: Install gpg secret key
+ run: cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
+
+ - name: Unit test
+ run: |
+ PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
+ echo "jar_version=${PROJECT_VERSION}" >> $GITHUB_OUTPUT
+ mvn -B --file pom.xml clean test -P test
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 07566f6..e262580 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.geosiris
energyml-utils
${project.groupId}:${project.artifactId}
- 1.0.8
+ 1.0.9
Geosiris
http://www.geosiris.com