-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 961 Bytes
/
snapshot.yml
File metadata and controls
33 lines (29 loc) · 961 Bytes
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: Publish Snapshot to Maven Central
on:
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+\-dev.[0-9]+'
jobs:
publish-snapshot:
if: "!contains(github.event.head_commit.message, '[maven-release-plugin]')"
runs-on: ubuntu-20.04-self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
server-id: central-portal-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN
- name: Publish Snapshot to Maven Central
run: |
./mvnw -B clean deploy -PsonatypeSnapshot -DskipTests -pl '!jacoco-coverage-aggregate-report,!documentation'
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USER }}
MAVEN_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}