-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (42 loc) · 1.42 KB
/
publish.yml
File metadata and controls
43 lines (42 loc) · 1.42 KB
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
37
38
39
40
41
42
43
name: publish version
on:
workflow_run:
workflows: ["Build and Test"]
branches: ["master"]
types:
- completed
jobs:
package-and-push:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
env:
MAVEN_ARGS: -B -ntp -Prelease
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'zulu'
- name: Bump the version
id: bump_version
uses: mathieudutour/github-tag-action@v5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
dry_run: true
release_branches: master
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Package docker
run: make package version=${{ steps.bump_version.outputs.new_version }} changelist="" args="${MAVEN_ARGS}"
- name: Publish docker
run: make publish version=${{ steps.bump_version.outputs.new_version }} changelist="" args="${MAVEN_ARGS}"
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.bump_version.outputs.new_tag }}
name: Release ${{ steps.bump_version.outputs.new_tag }}
body: ${{ steps.bump_version.outputs.changelog }}