-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (29 loc) · 989 Bytes
/
maven-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
name: Java CI Publish with Maven
on:
pull_request:
types: [closed]
branches: [develop]
release:
types: [published]
jobs:
publish:
# Only run if releases are published or pull requests are merged,
# omit running if pull requests are closed without merging
if: github.event.pull_request.merged || github.event.action == 'published'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
cache: 'maven'
- uses: s4u/maven-settings-action@7802f6aec16c9098b4798ad1f1d8ac75198194bd #3.0.0
with:
servers: |
[ {"id": "github-mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}]
- name: Publish with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn --batch-mode --fail-at-end clean deploy