-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (31 loc) · 932 Bytes
/
ci.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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- run: mvn -B package --file pom.xml
- name: Publish
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
OSSRH_USERNAME: ${{ secrets.SONATYPE_OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
GPG_SECRET_KEYS: ${{ secrets.PGP_PRIVATE_KEY }}
run: |
echo -e "$GPG_SECRET_KEYS" | gpg --import --no-tty --batch --yes
mvn clean deploy --settings .mvn/settings.xml -Dgpg.skip=false -Dmaven.test.skip=true -B