-
Notifications
You must be signed in to change notification settings - Fork 266
36 lines (34 loc) · 1.34 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 }}