-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (26 loc) · 997 Bytes
/
publish.yaml
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
name: 📦 Publish to Maven Central
on:
workflow_dispatch:
jobs:
publish-to-maven-central:
runs-on: ubuntu-latest
if: "github.event_name == 'workflow_dispatch'"
steps:
- name: ⬇️ Checkout repository
uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '18'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: 📦 Publish package
run: "./mvnw clean deploy --batch-mode -DskipTests -Pci-cd -pl calculation"
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_CENTRAL_GPG_PASSPHRASE }}