-
Notifications
You must be signed in to change notification settings - Fork 870
44 lines (41 loc) · 1.42 KB
/
main.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
name: Build
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: "Run build"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Use cache
uses: actions/cache@v4
with:
path: ~/.m2
key: "${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}"
restore-keys: |
${{ runner.os }}-maven3-
- name: Configure Java
uses: actions/setup-java@v4
with:
java-version: "11"
distribution: temurin
- name: "Run Maven"
shell: bash
run: mvn clean install --batch-mode -PintegrationTests
- name: "Deploy"
if: github.repository_owner == 'eirslett' && github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest'
shell: bash
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_TOKEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USERNAME }}
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }}
run: |
export GPG_TTY=$(tty)
echo -e "$GPG_KEY" | gpg --import --passphrase $GPG_PASSPHRASE --batch --yes
mvn --settings settings-github.xml -B deploy -Prelease -DskipTests