diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..dfc4454 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,19 @@ +name: Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + build: + uses: openmrs/openmrs-contrib-gha-workflows/.github/workflows/build-backend-module.yml@main + with: + java_versions: '["8", "11", "17", "21", "25"]' + main_java_version: '8' + secrets: + NVD_API_KEY: ${{ secrets.NVD_API_KEY }} + MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }} + MAVEN_REPO_API_KEY: ${{ secrets.MAVEN_REPO_API_KEY }} \ No newline at end of file diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index 5b6fe2d..0000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,30 +0,0 @@ -# this build is designed to replicate the Travis CI workflow -name: Java CI with Maven - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - java: [8, 11, 17, 21, 24] - - - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4 - with: - java-version: ${{ matrix.java }} - distribution: 'temurin' - cache: maven - - - name: Build with Maven - run: mvn clean install --file pom.xml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..43aa1e0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + workflow_dispatch: + inputs: + release_version: + description: 'Release version (e.g., 1.3.3)' + required: true + development_version: + description: 'Next development version (e.g., 1.4.0-SNAPSHOT)' + required: true + branch: + description: 'Branch to release from (e.g., master)' + required: false + default: 'master' + +jobs: + release: + uses: openmrs/openmrs-contrib-gha-workflows/.github/workflows/release-backend-module.yml@main + permissions: + contents: write + with: + release_version: ${{ inputs.release_version }} + development_version: ${{ inputs.development_version }} + branch: ${{ inputs.branch }} + java_version: '8' + secrets: + MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }} + MAVEN_REPO_API_KEY: ${{ secrets.MAVEN_REPO_API_KEY }} + BOT_PAT: ${{ secrets.BOT_PAT }} \ No newline at end of file