-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (49 loc) · 1.55 KB
/
Copy pathjava.yml
File metadata and controls
50 lines (49 loc) · 1.55 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
47
48
49
50
name: Java
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
MAVEN_CLI_OPTS: --batch-mode
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
OSSRH_GPG_KEYNAME: ${{ secrets.OSSRH_GPG_KEYNAME }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 50
- name: Fetch all tags
run: git fetch --depth=1 origin '+refs/tags/*:refs/tags/*'
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: pip install --requirement requirements.package.txt
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Set up ~/.m2/settings.xml
run: cp config/settings.xml ~/.m2/settings.xml
- name: Import GPG key
run: echo "${{ secrets.OSSRH_GPG_KEY }}" | base64 --decode | gpg --import --no-tty --batch --yes
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('templates/children/java/pom.xml.jinja2') }}
restore-keys: ${{ runner.os }}-maven-
- name: Generate and build artifacts
run: make build-java
- name: Deploy artifacts
if: github.ref == 'refs/heads/master'
run: make deploy-java