Skip to content

Commit

Permalink
GitHub Actions to deploy on Nexus
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuisson committed Apr 8, 2022
1 parent 7a76f84 commit b3d9951
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 22 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/build-and-test.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/build-test-publish.yml
@@ -0,0 +1,44 @@
name: Build and Publish

on:
push:
branches: [master]
pull_request:
branches: [master]


jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '8'

- name: Build and Test
run: mvn --batch-mode --update-snapshots clean package -P validator

- name: Set settings.xml
uses: s4u/maven-settings-action@v2.6.0
with:
servers: |
[{
"id": "mks-repo",
"username": "${{ secrets.NEXUS_USERNAME }}",
"password": "${{ secrets.NEXUS_PASSWORD }}"
},
{
"id": "mks-repo-snapshots",
"username": "${{ secrets.NEXUS_USERNAME }}",
"password": "${{ secrets.NEXUS_PASSWORD }}"
}]
if: ${{ github.ref == 'refs/heads/master' }}

- name: Publish
run: mvn --batch-mode clean deploy -P validator
if: ${{ github.ref == 'refs/heads/master' }}
13 changes: 13 additions & 0 deletions pom.xml
Expand Up @@ -354,4 +354,17 @@
</pluginRepository>
</pluginRepositories>

<distributionManagement>
<repository>
<id>mks-repo</id>
<name>Mekom Solutions Nexus Releases</name>
<url>https://nexus.mekomsolutions.net/repository/maven-releases</url>
</repository>
<snapshotRepository>
<id>mks-repo-snapshots</id>
<name>Mekom Solutions Nexus Snapshots</name>
<url>https://nexus.mekomsolutions.net/repository/maven-snapshots</url>
</snapshotRepository>
</distributionManagement>

</project>

0 comments on commit b3d9951

Please sign in to comment.