forked from evolvedbinary/appbundler-maven-build
-
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 901 Bytes
/
publish.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
name: Publish package to the Maven Central Repository
on:
workflow_dispatch:
release:
types: [created]
jobs:
publish:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build with Maven
run: mvn -V -B package
- name: Publish package
run: mvn --batch-mode deploy
env:
SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }}
SIGN_KEY_ID: ${{ secrets.GPG_KEY_ID }}
SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}