-
Notifications
You must be signed in to change notification settings - Fork 10
58 lines (50 loc) · 1.31 KB
/
gradle-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
57
58
name: Build, Test & Upload Library
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:10.9
env:
POSTGRES_DB: idempotence4j_db
POSTGRES_USER: username
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
mariadb:
image: mariadb:10.3.13
env:
MYSQL_DATABASE: idempotence4j_db
MYSQL_ROOT_PASSWORD: admin
MYSQL_USER: username
MYSQL_PASSWORD: password
ports:
- 3306:3306
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 1.13
uses: actions/setup-java@v1
with:
java-version: 1.13
server-id: github
settings-path: ${{ github.workspace }}
- name: Build with Gradle
run: ./gradlew build
- name: Publish to GitHub Packages
if: github.ref == 'refs/heads/master'
run: ./gradlew publish
env:
MAVEN_URL: https://maven.pkg.github.com/transferwise/idempotence4j
MAVEN_USER: ${{ github.actor }}
MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}