-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.65 KB
/
maven-deploy.yml
File metadata and controls
46 lines (41 loc) · 1.65 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
41
42
43
44
45
46
name: Deploy to OSSRH
# Run workflow on commits to default branch
on: workflow_dispatch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Check out Git repository
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Configure git user for release commits
env:
X_GITHUB_USERNAME: ${{ secrets.RELEASE_GITHUB_USERNAME }}
run: |
git config user.email "nicolas.hirrle@valtech.com"
git config user.name "${X_GITHUB_USERNAME}"
- id: publish-to-central
name: Publish to Central Repository
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
X_GITHUB_USERNAME: ${{ secrets.RELEASE_GITHUB_USERNAME }}
X_GITHUB_PASSWORD: ${{ secrets.RELEASE_GITHUB_PASSWORD }}
run: |
mvn -P release-sign-artifacts,adobe-public \
--no-transfer-progress \
--batch-mode \
-s ./.github/workflows/settings.xml \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
clean deploy -DdryRun=${{ github.event.inputs.dryRun }} -Darguments="-Dbaseline.skip=true"