-
Notifications
You must be signed in to change notification settings - Fork 24
32 lines (32 loc) · 995 Bytes
/
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
name: Deploy
on:
workflow_call:
inputs:
branch:
required: true
type: string
jdk:
default: 8
type: string
jobs:
Deploy:
name: Deploy to OSSRH
runs-on: ubuntu-latest
env:
VERTX_NEXUS_USERNAME: ${{ secrets.VERTX_NEXUS_USERNAME }}
VERTX_NEXUS_PASSWORD: ${{ secrets.VERTX_NEXUS_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ inputs.branch }}
- name: Install JDK
uses: actions/setup-java@v2
with:
java-version: ${{ inputs.jdk }}
distribution: temurin
- name: Get project version
run: echo "PROJECT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -q -DforceStdout | grep -v '\[')" >> $GITHUB_ENV
- name: Maven deploy
if: ${{ endsWith(env.PROJECT_VERSION, '-SNAPSHOT') }}
run: mvn deploy -s .github/maven-cd-settings.xml -DskipTests -B