-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.41 KB
/
release-api-maven.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Maven release publish to package registry
on:
release:
types: [ published ]
branches: [ master ]
permissions: write-all
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '16'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and publish to GitHub Packages
run: |
cd api
mvn deploy -s ${{ github.workspace }}/.m2/settings.xml
cd ..
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USER: ${{ github.repository_owner }}
- name: Generate JavaDoc
run: |
cd api
mvn javadoc:javadoc
cd ..
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}}}
GITHUB_USER: ${{ github.repository_owner }}
- name: Deploy JavaDoc
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}}}
git-config-name: ${{ github.repository_owner }}
git-config-email: ${{ github.repository_owner }}@users.noreply.github.com
force: false
clean: true
branch: docs
target-folder: .
folder: api/target/site/apidocs