Merge pull request #56 from mozzy11/master #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy | |
on: | |
push: | |
branches: [ main ] | |
release: | |
types: [ created ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 8.0.232 | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build and Test | |
run: mvn --batch-mode --update-snapshots clean package -DskipTests | |
- name: Set settings.xml | |
uses: s4u/[email protected] | |
with: | |
servers: | | |
[{ | |
"id": "uwdigi-repo-central", | |
"username": "${{ secrets.MAVEN_REPO_USERNAME }}", | |
"password": "${{ secrets.MAVEN_REPO_PASSWORD }}" | |
}, | |
{ | |
"id": "uwdigi-repo-snapshots", | |
"username": "${{ secrets.MAVEN_REPO_USERNAME }}", | |
"password": "${{ secrets.MAVEN_REPO_PASSWORD }}" | |
}] | |
if: ${{ github.ref == 'refs/heads/master' && github.repository_owner == 'IsantePlus' }} | |
- name: Deploy | |
run: mvn --batch-mode clean deploy -DskipTests | |
if: ${{ github.ref == 'refs/heads/master' && github.repository_owner == 'IsantePlus' }} |