Skip to content

Workflow file for this run

name: Publish to Maven Central and Docker Hub
on:
release:
types: [ published ]
jobs:
publish:
environment: mavenCentralPublish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Setup Java
uses: actions/setup-java@91d3aa4956ec4a53e477c4907347b5e3481be8c9 # v2
with:
distribution: 'adopt'
java-version: '11'
- name: Login to Docker Hub
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Publish to Maven Central
env:
ORG_GRADLE_PROJECT_signKey: ${{ secrets.SIGN_KEY }}
ORG_GRADLE_PROJECT_signKeyPass: ${{ secrets.SIGN_KEY_PASS }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew publishEmbeddedPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository
- name: Push To Docker Hub
run: PUSH_IMAGE=true docker/publish.sh
- name: Attach HiveMQ Zip to GitHub Release
run: ./gradlew githubRelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}