-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (39 loc) · 1.36 KB
/
auto-deploy.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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Auto deploy
on:
push:
branches:
- master
tags:
- tecsinapse-oss-parent-*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: sonatype-nexus
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-passphrase: GPG_PASSPHRASE
gpg-private-key: ${{ secrets.OSS_GPG_PRIVATE_KEY }}
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
- name: Deploy
run: mvn -B deploy -Dmaven.test.skip=true -Dfindbugs.skip=true -DperformRelease=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_KEYNAME: ${{ secrets.OSS_GPG_KEYNAME }}
GPG_PASSPHRASE: ${{ secrets.OSS_GPG_PASSPHRASE }}
SONATYPE_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}