Skip to content

Commit 1711c39

Browse files
Fix GH actions for multi-module
1 parent 73034c0 commit 1711c39

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

.github/workflows/create-github-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ jobs:
5454
5555
OS_NAME=${{ matrix.os }}
5656
if [[ "$OS_NAME" == "windows-latest" ]]; then
57-
BIN_PATH=$(find target -type f -name "jfiletreeprettyprinter.exe")
57+
BIN_PATH=$(find jfiletreeprettyprinter-cli/target -type f -name "jfiletreeprettyprinter.exe")
5858
else
59-
BIN_PATH=$(find target -type f -name "jfiletreeprettyprinter")
59+
BIN_PATH=$(find jfiletreeprettyprinter-cli/target -type f -name "jfiletreeprettyprinter")
6060
fi
6161
6262
echo "Found binary: $BIN_PATH"

.github/workflows/publish-maven-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
- name: Update pom.xml to release version
5252
run: |
53-
mvn versions:set -DnewVersion=${{ env.RELEASE_VERSION }} -B -q
53+
mvn versions:set-property -Dproperty=revision -DnewVersion=${{ env.RELEASE_VERSION }} -B -q
5454
git commit -am "Set version to ${{ env.RELEASE_VERSION }}" || echo "No changes"
5555
git push origin HEAD:main
5656
env:
@@ -60,7 +60,7 @@ jobs:
6060
run: mvn clean verify -B
6161

6262
- name: Publish RELEASE to Maven Central
63-
run: mvn deploy -P release -B -DskipTests
63+
run: mvn deploy -pl jfiletreeprettyprinter-core -P release -B -DskipTests
6464
env:
6565
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
6666
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
@@ -73,6 +73,6 @@ jobs:
7373
NEXT_PATCH=$((PATCH+1))
7474
NEXT_VERSION="$MAJOR.$MINOR.$NEXT_PATCH-SNAPSHOT"
7575
echo "NEXT_VERSION=$NEXT_VERSION" >> $GITHUB_ENV
76-
mvn versions:set -DnewVersion=$NEXT_VERSION -B -q
76+
mvn versions:set-property -Dproperty=revision -DnewVersion=$NEXT_VERSION -B -q
7777
git commit -am "Set version to $NEXT_VERSION" || echo "No changes"
7878
git push origin HEAD:main

.github/workflows/snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Publish SNAPSHOT to Maven Central
3939
run: |
40-
mvn -P release --batch-mode deploy -am -DskipTests
40+
mvn -pl jfiletreeprettyprinter-core -P release --batch-mode deploy -am -DskipTests
4141
env:
4242
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
4343
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

.github/workflows/sonarcloud.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ jobs:
4444
- name: Build and analyze
4545
env:
4646
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
47-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.host.url="https://sonarcloud.io" -Dsonar.exclusions=src/test/** -Dsonar.coverage.exclusions=/src/test/** -Dsonar.organization=computerdaddyguy -Dsonar.projectKey=ComputerDaddyGuy_JFileTreePrettyPrinter
47+
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.host.url="https://sonarcloud.io" -Dsonar.organization=computerdaddyguy -Dsonar.projectKey=ComputerDaddyGuy_JFileTreePrettyPrinter

pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@
6969
<git-commit-id-maven-plugin.version>9.0.2</git-commit-id-maven-plugin.version>
7070
<flatten-maven-plugin.version>1.7.3</flatten-maven-plugin.version>
7171

72+
<!-- Sonar -->
73+
<sonar.exclusions>
74+
**/src/test/**
75+
</sonar.exclusions>
76+
<sonar.coverage.exclusions>
77+
**/src/test/**
78+
</sonar.coverage.exclusions>
79+
7280
</properties>
7381

7482
<dependencyManagement>

0 commit comments

Comments
 (0)