-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (42 loc) · 1.33 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
name: 'Release'
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Pull GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSWORD }}
- name: Pull settings file
env:
SETTINGS_XML: ${{ vars.SETTINGS_XML }}
run: |
echo "$SETTINGS_XML" | base64 -d > settings.xml
- name: Set job git credentials
run: |
git config --local user.email '[email protected]'
git config --local user.name 'gh-chore'
- name: Create release branch
run:
git checkout -b release
- name: Release
env:
GPG_KEY_ID: ${{ vars.GPG_KEY_ID }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
run: |
mvn -B --settings settings.xml release:prepare
mvn -B --settings settings.xml -DskipTests release:perform