-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (29 loc) · 1.14 KB
/
publishPRSnapshot.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
name: Publish SNAPSHOT on PR
on:
pull_request:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Set up Maven Central Repository
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
server-id: github
server-username: ${{ secrets.DCSA_USER }}
server-password: ${{ secrets.DCSA_PACKAGES_PAT }}
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v12
with:
repositories: '[{ "id": "github", "name": "DCSA Backend repo", "url": "https://maven.pkg.github.com/dcsaorg/DCSA-Core", "releases": { "enabled": "true" }, "snapshots": { "enabled": "true" } }]'
servers: '[{ "id": "github", "username": "${{ secrets.DCSA_USER }}", "password": "${{ secrets.DCSA_PACKAGES_PAT }}" }]'
- name: Publish package
run: mvn -B deploy -Dsha1=-${{ github.head_ref }} -Dchangelist=-SNAPSHOT