-
Notifications
You must be signed in to change notification settings - Fork 1.9k
42 lines (39 loc) · 1.3 KB
/
snapshot.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
name: Upload Snapshot
on:
push:
branches:
- master
workflow_dispatch: {}
permissions:
contents: read
jobs:
verify:
name: latest-images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.x
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Assert Snapshot Version
run: |
./mvnw clean install -Dmaven.test.skip=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
./mvnw -q \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dexec.executable=echo \
-Dexec.args='${project.version}' \
exec:exec | perl -ne 'die unless m/.*-SNAPSHOT/'
- name: Publish to Apache Maven Central
run: ./mvnw deploy
env:
OSSRH_USERNAME: ${{ secrets.SNAPSHOT_UPLOAD_USER }}
OSSRH_TOKEN: ${{ secrets.SNAPSHOT_UPLOAD_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}