forked from spbogui/org.openmrs.module.hivscreening
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from samuelmale/chore/configure-ci
Add Github workflows and misc cleanup
- Loading branch information
Showing
8 changed files
with
196 additions
and
40 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build and Deploy | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
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 | ||
|
||
- 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/main' && github.repository_owner == 'SIGDEP-3' }} | ||
|
||
- name: Deploy | ||
run: mvn --batch-mode clean deploy | ||
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'SIGDEP-3' }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Build and Test | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: HIV_SCREENING Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: "The branch to checkout when cutting the release." | ||
required: true | ||
default: "main" | ||
releaseVersion: | ||
description: "Default version to use when preparing a release." | ||
required: true | ||
default: "X.Y.Z" | ||
developmentVersion: | ||
description: "Default version to use for new local working copy." | ||
required: true | ||
default: "X.Y.Z-SNAPSHOT" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
|
||
- 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 | ||
|
||
- name: Configure Git User | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Actions" | ||
- name: Perform Release | ||
run: mvn release:prepare release:perform -B -s .maven-settings.xml -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} | ||
env: | ||
MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }} | ||
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }} | ||
GITHUB_ACTOR: ${{ github.actor }} | ||
GITHUB_TOKEN: ${{ github.token }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ | |
|
||
### Linux ### | ||
.* | ||
!.maven-settings.xml | ||
!.github | ||
!.gitignore | ||
!.gitattributes | ||
*~ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 | ||
http://maven.apache.org/xsd/settings-1.2.0.xsd" | ||
xmlns="http://maven.apache.org/SETTINGS/1.2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<profiles> | ||
<profile> | ||
<repositories> | ||
<repository> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
<id>uwdigi-repo-central</id> | ||
<name>libs-release</name> | ||
<url>https://packages.uwdigi.org/artifactory/libs-release</url> | ||
</repository> | ||
<repository> | ||
<snapshots /> | ||
<id>uwdigi-repo-snapshots</id> | ||
<name>libs-snapshot</name> | ||
<url>https://packages.uwdigi.org/artifactory/libs-snapshot</url> | ||
</repository> | ||
</repositories> | ||
<pluginRepositories> | ||
<pluginRepository> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
<id>uwdigi-repo-central</id> | ||
<name>libs-release</name> | ||
<url>https://packages.uwdigi.org/artifactory/libs-release</url> | ||
</pluginRepository> | ||
<pluginRepository> | ||
<snapshots /> | ||
<id>uwdigi-repo-snapshots</id> | ||
<name>libs-snapshot</name> | ||
<url>https://packages.uwdigi.org/artifactory/libs-snapshot</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
<id>default</id> | ||
</profile> | ||
</profiles> | ||
<activeProfiles> | ||
<activeProfile>default</activeProfile> | ||
</activeProfiles> | ||
<servers> | ||
<server> | ||
<username>${env.MAVEN_REPO_USERNAME}</username> | ||
<password>${env.MAVEN_REPO_PASSWORD}</password> | ||
<id>uwdigi-repo-central</id> | ||
</server> | ||
<server> | ||
<username>${env.MAVEN_REPO_USERNAME}</username> | ||
<password>${env.MAVEN_REPO_PASSWORD}</password> | ||
<id>uwdigi-repo-snapshots</id> | ||
</server> | ||
<server> | ||
<username>${env.GITHUB_ACTOR}</username> | ||
<password>${env.GITHUB_TOKEN}</password> | ||
<id>github</id> | ||
</server> | ||
</servers> | ||
</settings> | ||
|
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
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
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