Skip to content

Commit

Permalink
Add GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
Alemiz112 committed Nov 5, 2023
1 parent 44a73bb commit 12c5e5a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 46 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Publish

on:
workflow_dispatch:
push:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Java 8
uses: actions/setup-java@v3
with:
java-version: 8

- name: Setup maven repo
uses: s4u/[email protected]
with:
servers: |
[{
"id": "waterdog-snapshots",
"username": "${{ secrets.DEPLOY_USERNAME }}",
"password": "${{ secrets.DEPLOY_PASSWORD }}"
}]
- name: Build
if: ${{ github.ref != 'refs/heads/master' }}
run: mvn -B clean package
shell: bash

- name: Build and Deploy
if: ${{ github.ref == 'refs/heads/master' }}
run: mvn -B clean package deploy
shell: bash
43 changes: 0 additions & 43 deletions Jenkinsfile

This file was deleted.

6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@
<repositories>
<repository>
<id>waterdog</id>
<url>https://repo.waterdog.dev/artifactory/main</url>
<url>https://repo.waterdog.dev/main</url>
</repository>
</repositories>

<distributionManagement>
<repository>
<id>central</id>
<name>waterdog-releases</name>
<url>http://repo.waterdog.dev/artifactory/releases</url>
<url>https://repo.waterdog.dev/releases</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>waterdog-snapshots</name>
<url>http://repo.waterdog.dev/artifactory/snapshots</url>
<url>https://repo.waterdog.dev/snapshots</url>
</snapshotRepository>
</distributionManagement>

Expand Down

0 comments on commit 12c5e5a

Please sign in to comment.