-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (37 loc) · 1.47 KB
/
release.yaml
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
name: Release
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress --settings=.github/settings.xml
steps:
- run: git config --global user.name "${{ vars.KOKUWA_IO_BOT_NAME }}"
- run: git config --global user.email "${{ vars.KOKUWA_IO_BOT_EMAIL }}"
- uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_ACTION_TOKEN }}
- uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: maven
server-id: sonatype-nexus
server-username: SERVER_USERNAME
server-password: SERVER_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- run: mvn $MAVEN_ARGS dependency:go-offline
- run: mvn $MAVEN_ARGS release:prepare -Darguments="$MAVEN_ARGS"
- run: mvn $MAVEN_ARGS release:perform -Darguments="$MAVEN_ARGS"
env:
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
GIT_ACTION_TOKEN: ${{ secrets.GIT_ACTION_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}