Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bateller committed Jul 27, 2024
1 parent 5191e74 commit b1909f5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish-jar.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish JAR to GitHub Packages
name: Build and Publish JAR to GitHub Packages

on:
push:
Expand All @@ -12,7 +12,7 @@ on:
workflow_dispatch:

jobs:
publish:
build:
runs-on: ubuntu-latest

steps:
Expand All @@ -28,6 +28,9 @@ jobs:
- name: Build with Maven
run: mvn clean package

- name: Run Checkstyle
run: mvn checkstyle:check

- name: Publish to GitHub Packages
run: mvn deploy -s ${{ github.workspace }}/settings.xml
env:
Expand Down
26 changes: 26 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<distributionManagement>
Expand All @@ -16,4 +17,29 @@
<url>https://maven.pkg.github.com/wbat/java-jar-test</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<configLocation>google_checks.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
</configuration>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
File renamed without changes.
7 changes: 7 additions & 0 deletions src/main/java/wbat/javajar/TestClass.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.wbat.javajar;

public class TestClass {
public String testMethod() {
return "Hello, World!";
}
}

0 comments on commit b1909f5

Please sign in to comment.