Skip to content

FMI to VDM

FMI to VDM #638

Workflow file for this run

# 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: FMI to VDM
on: [workflow_dispatch, push, pull_request]
env:
JAVA_VERSION: 1.8
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- name: Build with Maven
run: mvn clean package
deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/development'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure deploy for snapshots
if: github.ref == 'refs/heads/development'
run: echo "SERVER_ID=artifactory-into-cps-snapshots" >> $GITHUB_ENV
- name: Environment variables
run: echo ${{ env.SERVER_ID }}
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
server-id: ${{ env.SERVER_ID }}
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Deploy
run: mvn -B -X deploy
env:
MAVEN_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}