diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml
index 4615ca4..437f673 100644
--- a/.github/workflows/gh-registry.yml
+++ b/.github/workflows/gh-registry.yml
@@ -70,3 +70,21 @@ jobs:
working-directory: 'hello-strongbox-npm'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ publish-hello-strongbox-maven:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ # generate GitHub Package Registry ci-friendly version to avoid collision
+ - run: echo "GPR_VERSION=$(date '+%Y%m%d.%H%M')" >> $GITHUB_ENV
+ - name: Maven install
+ run: mvn -Dgpr.version=$GPR_VERSION clean install
+ working-directory: 'hello-strongbox-maven'
+ # This is seperate so it may only be deployed conditionally
+ - name: Maven deploy
+ run: mvn -Dgpr.version=$GPR_VERSION -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/$GITHUB_REPOSITORY deploy
+ working-directory: 'hello-strongbox-maven'
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/hello-strongbox-maven/pom.xml b/hello-strongbox-maven/pom.xml
index 3caf7af..5556155 100644
--- a/hello-strongbox-maven/pom.xml
+++ b/hello-strongbox-maven/pom.xml
@@ -7,10 +7,18 @@
org.carlspring.strongbox.examples
hello-strongbox-maven
- 1.0-SNAPSHOT
+ ${gpr.version}
2019
+
+
+
+
+
+ 1.0-SNAPSHOT
+
+
junit
@@ -43,4 +51,17 @@
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+ 1.8
+ 1.8
+
+
+
+