-
Notifications
You must be signed in to change notification settings - Fork 28
56 lines (49 loc) · 1.47 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: publish
on:
push:
branches:
- master
- develop
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Build with Maven
run: mvn -B verify
- name: Setup Maven Central
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Publish to Maven Central
run: mvn -B deploy -P release -DskipTests
env:
OSSRH_USERNAME: ${{ secrets.S01_OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.S01_OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: 'Trigger ehrbase build'
if: github.ref == 'refs/heads/develop'
run: |
curl \
-X POST \
-H "Authorization: token ${{ secrets.BOT_ACCESS_TOKEN }}" \
-H "Content-Type: application/json" \
https://api.github.com/repos/ehrbase/ehrbase/dispatches \
-d '{"event_type":"build-and-test-postgres"}'