-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (48 loc) · 1.95 KB
/
release.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
# 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: Release
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'releaseVersion'
required: true
default: '2.1.1.RELEASE'
developmentVersion:
description: 'developmentVersion'
required: true
default: '2.1.2.BUILD-SNAPSHOT'
dryRun:
description: 'dryRun'
required: true
default: 'false'
jobs:
build:
env:
NEMESIS_REPOSITORY_HTTP_USERNAME: ${{ secrets.NEMESIS_REPOSITORY_HTTP_USERNAME }}
NEMESIS_REPOSITORY_HTTP_PASSWORD: ${{ secrets.NEMESIS_REPOSITORY_HTTP_PASSWORD }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: maven-
- name: Set up JDK 11
id: setup-java
uses: actions/setup-java@v1
with:
java-version: 11.0.4
- name: Prepare Release Artifacts with Maven
uses: qcastel/github-actions-maven-release@master
env:
JAVA_HOME: /usr/lib/jvm/java-11-openjdk/
NEMESIS_REPOSITORY_HTTP_USERNAME: ${{ secrets.NEMESIS_REPOSITORY_HTTP_USERNAME }}
NEMESIS_REPOSITORY_HTTP_PASSWORD: ${{ secrets.NEMESIS_REPOSITORY_HTTP_PASSWORD }}
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
maven-servers: ${{ secrets.MVN_REPO_SERVERS }}
maven-args: -B -DdryRun=${{github.event.inputs.dryRun}} -Dtag=${{github.event.inputs.releaseVersion}} -Dnemesis.version=${{github.event.inputs.releaseVersion}} -s src/main/resources/settings.xml
maven-development-version-number: ${{github.event.inputs.developmentVersion}}
maven-release-version-number: ${{github.event.inputs.releaseVersion}}