diff --git a/.github/workflows/upload-http-client-jars.yml b/.github/workflows/upload-http-client-jars.yml index cf049458c79..d6780730581 100644 --- a/.github/workflows/upload-http-client-jars.yml +++ b/.github/workflows/upload-http-client-jars.yml @@ -10,6 +10,7 @@ on: - 'http-clients/**' - 'lib/java-extras/**' - 'lib/websocket-client/**' + - 'lib/feign-common/**' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: @@ -32,6 +33,6 @@ jobs: BUILD_VERSION=$(game-app/run/.build/get-build-version) echo "JAR_VERSION=$BUILD_VERSION" | tee -a $GITHUB_ENV - name: Publish lobby client JAR - run: ./gradlew :http-clients:lobby-client:publish :game-app:domain-data:publish :lib:java-extras:publish :lib:websocket-client:publish + run: ./gradlew :http-clients:lobby-client:publish :game-app:domain-data:publish :lib:java-extras:publish :lib:websocket-client:publish :lib:feign-common:publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/lib/feign-common/build.gradle b/lib/feign-common/build.gradle index a371c885274..03e12db1618 100644 --- a/lib/feign-common/build.gradle +++ b/lib/feign-common/build.gradle @@ -1,5 +1,34 @@ +import org.gradle.api.publish.maven.MavenPublication + +plugins { + id 'java-library' + id("maven-publish") +} + +version = System.getenv("JAR_VERSION") + dependencies { implementation project(":game-app:domain-data") implementation project(":lib:java-extras") testImplementation project(":lib:test-common") } + +publishing { + publications { + maven(MavenPublication) { + artifact(tasks.named(sourceSets.main.jarTaskName)) { + extension 'jar' + } + } + } + repositories { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/triplea-game/triplea" + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } +}