Skip to content

Commit

Permalink
Merge pull request #2 from Bahmni/BAH-1386
Browse files Browse the repository at this point in the history
BAH 1386 | Workflow to build and upload artifacts to nexus
  • Loading branch information
N0-man authored Mar 3, 2022
2 parents fa953b1 + 72b09d3 commit 20b2274
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 8 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and Publish package
on:
push:
branches: [ master ]

jobs:
build-publish-package:
name: Build and Publish package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: nexus-sonatype
server-username: NEXUS_USERNAME
server-password: NEXUS_PASSWORD
- name: Build and deploy with Maven
run: mvn --no-transfer-progress clean -U deploy
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
19 changes: 19 additions & 0 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Validate PR
on:
pull_request:
branches:
- master

jobs:
build-test-package:
name: Build and Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Build and Package with Maven
run: mvn --no-transfer-progress clean -U install
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.project
.classpath
target
.talismanrc

# Package Files #
*.jar
Expand Down
36 changes: 28 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,34 @@
<mockitoVersion>1.10.19</mockitoVersion>
</properties>

<distributionManagement>
<snapshotRepository>
<id>repo.mybahmni.org</id>
<name>bahmni-artifactory-snapshots</name>
<url>s3://repo.mybahmni.org/artifactory/snapshot</url>
</snapshotRepository>
</distributionManagement>

<profiles>
<profile>
<id>nexus-sonatype</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<distributionManagement>
<snapshotRepository>
<id>nexus-sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>nexus-sonatype</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
</distributionManagement>
</profile>
<profile>
<id>mybahmni-s3</id>
<distributionManagement>
<snapshotRepository>
<id>repo.mybahmni.org</id>
<name>bahmni-artifactory-snapshots</name>
<url>s3://repo.mybahmni.org/artifactory/snapshot</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
<dependencyManagement>
<dependencies>
<dependency>
Expand Down

0 comments on commit 20b2274

Please sign in to comment.