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@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: Login to Docker Hub
uses: docker/login-action@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 }}