This repository was archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1.44 KB
/
test-deploy.yml
File metadata and controls
40 lines (35 loc) · 1.44 KB
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
name: Test Deployment CI
on:
workflow_dispatch:
jobs:
publish_central: # Publish the code to central
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK OSSRH
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '8'
# server-id: ossrh
# server-username: MAVEN_CENTRAL_USERNAME
# server-password: MAVEN_CENTRAL_TOKEN
# gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
# Due to https://github.com/actions/setup-java/issues/85 we can only
# add ONE server using setup-java...
overwrite-settings: false
# ... so let's simply copy a predefined settings.xml file into the m2 folder
# until GH makes it work
- name: Copy predefined settings into home m2 folder
run: |
mkdir -p ~/.m2/
cp .github/workflows/maven/m2-settings-release.xml ~/.m2/settings.xml
- name: Publish to OSSRH
run: mvn -B deploy -Pxdev-build,ossrh
env:
GH_PACKAGES_READ_USERNAME: ${{ secrets.GH_PACKAGES_READ_USERNAME }}
GH_PACKAGES_READ_TOKEN: ${{ secrets.GH_PACKAGES_READ_TOKEN }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}