71 lines (68 loc) · 1.87 KB
/
release.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Release
on:
release:
types:
- published
env:
JAVA_TOOL_OPTIONS: >-
-XX:TieredStopAtLevel=1
-XX:+UseParallelGC
-Dstyle.color=always
-Djansi.force=true
jobs:
build:
name: Build
uses: './.github/workflows/maven-build.yml'
deploy:
name: Deploy
needs: build
uses: './.github/workflows/maven-deploy.yml'
secrets: inherit
deploy-site:
name: Maven deploy site
runs-on: ubuntu-20.04
if: github.repository == 'gantsign/ktlint-maven-plugin'
needs: deploy
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: Cache local Maven repository
uses: gantsign/maven-periodic-cache-action@v1
with:
key-suffix: '-deploy-site'
additional-path: '!~/.m2/repository/com/github/gantsign/maven'
- name: Configure Git user
run: >-
git config --global user.name 'John Freeman' &&
git config --global user.email '17984707+freemanjp@users.noreply.github.com'
- name: Build Maven site
run: |
./mvnw site \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode \
--show-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Stage Maven site
run: |
./mvnw site:stage \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Maven site
run: |
./mvnw scm-publish:publish-scm \
-P gh-pages \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}