-
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (55 loc) · 1.61 KB
/
Copy pathrelease.yml
File metadata and controls
56 lines (55 loc) · 1.61 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
name: Deploy Maven Release
on:
workflow_dispatch: {}
release:
types: [published]
concurrency:
group: release
permissions:
contents: write
packages: write
id-token: write
attestations: write
env:
GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'temurin'
cache: maven
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
- name: Test with Maven
run: mvn --batch-mode test verify --file pom.xml
build:
runs-on: ubuntu-24.04
needs: test
environment:
name: release
url: ${{ steps.deployment.outputs.url }}
steps:
- uses: actions/checkout@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'temurin'
cache: maven
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
- name: Set GitHub Credentials
run: |
git config --global user.name "Coderic"
git config --global user.email "coderic@coderic.org"
- name: Build package
run: mvn --batch-mode package --file pom.xml
- name: Prepare package
run: mvn --batch-mode release:prepare -DtagNameFormat=@{project.version} --file pom.xml
- name: Deploy package
id: deployment
run: mvn --batch-mode release:perform -DtagNameFormat=@{project.version} --file pom.xml