-
Notifications
You must be signed in to change notification settings - Fork 17
55 lines (46 loc) · 1.95 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
44
45
46
47
48
49
50
51
52
53
54
55
name: Log4JNA Release
on:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
entry:
- { java: "11", distribution: "temurin" }
runs-on: "windows-2019"
name: Java ${{ matrix.entry.java }} ( ${{ matrix.entry.distribution }} )
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Configuring Developer Command Prompt for Microsoft Visual C++
- uses: ilammy/msvc-dev-cmd@v1
# Setup JDK
- uses: actions/setup-java@v3
with:
distribution: ${{ matrix.entry.distribution }}
java-version: ${{ matrix.entry.java }}
server-id: central
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
# Set git config
- run: |
git config --global user.name github-actions[bot]
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
# Prepare Release
- run: mvn clean release:prepare -P release
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
GITHUB_USERNAME: ${{ secrets.GIT_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
# Perform Release
- run: mvn clean release:perform -P release
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
GITHUB_USERNAME: ${{ secrets.GIT_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}