-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (71 loc) · 2.13 KB
/
Copy pathrelease.yaml
File metadata and controls
81 lines (71 loc) · 2.13 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
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
72
73
74
75
76
77
78
79
80
81
name: Release
on:
push:
branches: [ master ]
env:
MAVEN_INIT: 'false'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version-file: .java-version
cache: maven
- name: Run tests
uses: extenda/actions/maven@v0
with:
args: verify
service-account-key: ${{ secrets.SECRET_AUTH }}
- name: Scan with SonarCloud
uses: extenda/actions/sonar-scanner@v0
with:
sonar-host: https://sonarcloud.io
sonar-scanner: maven
main-branch: master
service-account-key: ${{ secrets.SECRET_AUTH }}
release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs:
- test
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version-file: .java-version
cache: maven
server-id: central
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Create release
uses: extenda/actions/conventional-release@v0
id: release
with:
name: ''
tag-prefix: 'v'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build release
uses: extenda/actions/maven@v0
with:
args: deploy -DskipTests
version: ${{ steps.release.outputs.version }}
service-account-key: ${{ secrets.SECRET_AUTH }}
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_KEY_NAME: ${{ secrets.MAVEN_CENTRAL_GPG_KEY_NAME }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_CENTRAL_GPG_PASSPHRASE }}