-
Notifications
You must be signed in to change notification settings - Fork 16
55 lines (48 loc) · 1.58 KB
/
deploy-snapshots.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
name: Deploy Snaphosts
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy-snapshots:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Setup Java Action
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: 'temurin'
java-version: 17
- name: Setup Maven Action
uses: s4u/setup-maven-action@4f7fb9d9675e899ca81c6161dadbba0189a4ebb1 # v1.18.0
with:
java-distribution: 'temurin'
java-version: 17
maven-version: 3.9.9
cache-enabled: true
settings-servers: |
[{
"id": "central",
"username": "${{ secrets.CENTRAL_USERNAME }}",
"password": "${{ secrets.CENTRAL_PASSWORD }}"
}]
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
with:
gpg_private_key: ${{ secrets.GPG_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: List keys
run: gpg -K
- name: Maven build
run: mvn --batch-mode -Psign --update-snapshots -Dmaven.resolver.transport=wagon deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
with:
files: target/site/jacoco/jacoco.xml
token: ${{ secrets.CODECOV_TOKEN }}