-
Notifications
You must be signed in to change notification settings - Fork 24
52 lines (51 loc) · 1.81 KB
/
publish-snapshots-on-merge.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Publish snapshot package to the Maven Central Repository
on:
push:
branches:
- 'master'
- 'candidate-*'
create:
branches:
- 'candidate-*'
jobs:
publish-maven-central:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USER_NAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASS }}
publish-jfrog-artifactory:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Jfrog Artifactory Deployment
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
server-id: 'jfrog-snapshot'
server-username: JFROG_USER
server-password: JFROG_TOKEN
gpg-private-key: ${{ secrets.SIGNING_SECRET }}
gpg-passphrase: JFROG_GPG_PASSPHRASE
- name: Publish package
if: contains(github.ref_name, '-release') == false
run: mvn -Pjfrog-artifactory -Dgpg.passphrase=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DstagingProgressTimeoutMinutes=20 clean deploy -e
env:
JFROG_USER: ${{ secrets.JFROG_USER }}
JFROG_TOKEN: ${{ secrets.JFROG_TOKEN }}
JFROG_GPG_PASSPHRASE: ${{ secrets.SIGN_MODULES_PASSPHRASE }}
JFROG_URL: ${{ vars.JFROG_URL }}
JFROG_SNAPSHOT_REPOSITORY: ${{ vars.JFROG_SNAPSHOT_REPOSITORY }}
JFROG_REPOSITORY: ${{ vars.JFROG_REPOSITORY }}