Skip to content

Commit

Permalink
Ci (#24)
Browse files Browse the repository at this point in the history
* fixing version to tag name
  • Loading branch information
valentin-gauthier-geosiris committed Sep 25, 2023
1 parent a2115f1 commit a065469
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/pull-tests.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.geosiris</groupId>
<artifactId>energyml-utils</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<version>1.0.8</version>
<version>1.0.9</version>
<organization>
<name>Geosiris</name>
<url>http://www.geosiris.com</url>
Expand Down

0 comments on commit a065469

Please sign in to comment.