diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
index 440196e0e..11c1a4d91 100644
--- a/.github/workflows/ci-cd.yml
+++ b/.github/workflows/ci-cd.yml
@@ -39,18 +39,18 @@ jobs:
- uses: actionshub/markdownlint@main
with:
filesToIgnoreRegex: "docs/node_modules\\/.*"
-# markdown-link-check:
-# name: Markdown Link Check
-# runs-on: ubuntu-latest
-# steps:
-# - uses: actions/checkout@v3
-# - uses: gaurav-nelson/github-action-markdown-link-check@v1
-# with:
-# use-verbose-mode: "yes"
+ markdown-link-check:
+ name: Markdown Link Check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: gaurav-nelson/github-action-markdown-link-check@v1
+ with:
+ use-verbose-mode: "yes"
tests:
name: Unit & Integration Tests
- needs: [yaml-lint, markdown-lint]
+ needs: [yaml-lint, markdown-lint, markdown-link-check]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -131,3 +131,40 @@ jobs:
context: athena-examples/athena-example-books
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/athena-example-books:latest
+
+ maven-release:
+ name: Publish Athena to Maven Central
+ if: github.ref == 'refs/heads/master'
+ needs: tests
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write # allow for pushing tag
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0 # https://github.com/actions/checkout/issues/338#issuecomment-732300720
+ - name: Set up JDK
+ uses: QubitPi/hashicorp-aws/hashicorp/webservice/auxiliary/github/actions/jdk-setup@master
+ - name: Tag for release
+ run: |
+ git config --global user.name '$USER'
+ git config --global user.email '$EMAIL'
+ .github/tag-for-release.bash
+ - name: Set release version
+ run: |
+ VERSION=$(git describe)
+ mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
+ mvn versions:update-property -Dproperty=version.athena -DnewVersion=$VERSION -DgenerateBackupPoms=false
+ - name: Generate settings file
+ uses: whelk-io/maven-settings-xml-action@v20
+ with:
+ servers: >
+ [
+ {
+ "id": "ossrh",
+ "username": "${{ secrets.USERNAME }}",
+ "password": "${{ secrets.PASSWORD }}"
+ }
+ ]
+ - name: Publish to Maven Central
+ run: mvn --batch-mode deploy
diff --git a/pom.xml b/pom.xml
index 458da8d80..20178b3f1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,10 +36,13 @@
+
+ ossrh
+ https://s01.oss.sonatype.org/content/repositories/snapshots
+
- github
- GitHub QubitPi Apache Maven Packages
- https://maven.pkg.github.com/QubitPi/athena
+ ossrh
+ https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
@@ -588,6 +591,18 @@
org.apache.maven.plugins
maven-failsafe-plugin
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.7
+ true
+
+ ossrh
+ https://s01.oss.sonatype.org/
+ true
+
+