Skip to content

Commit 70c30e1

Browse files
committed
Add Github build
1 parent 38f306c commit 70c30e1

File tree

2 files changed

+27
-42
lines changed

2 files changed

+27
-42
lines changed

.github/workflows/build-deploy-release.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,37 @@
1-
name: Build with Maven
1+
name: Build, Deploy, and Release
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [release]
66
pull_request:
7-
branches: [ main ]
7+
branches: [release]
88
workflow_dispatch:
9+
inputs:
10+
release_version:
11+
description: 'Release version (e.g., 1.3.3)'
12+
required: true
13+
development_version:
14+
description: 'Next development version (e.g., 1.4.0-SNAPSHOT)'
15+
required: true
916

1017
jobs:
1118
build:
12-
uses: openmrs/openmrs-contrib-gha-workflows/.github/workflows/build-backend-module.yml@main
19+
name: Build and Test
20+
if: github.event_name == 'push' || github.event_name == 'pull_request'
21+
uses: wikumChamith/openmrs-contrib-gha-workflows/.github/workflows/build-backend-module.yml@release
1322
with:
1423
java_versions: '[8]'
15-
main_java_version: '8'
24+
main_java_version: '8'
25+
secrets:
26+
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
27+
28+
release:
29+
name: Release
30+
if: github.event_name == 'workflow_dispatch'
31+
uses: wikumChamith/openmrs-contrib-gha-workflows/.github/workflows/release-backend-module.yml@release
32+
with:
33+
release_version: ${{ inputs.release_version }}
34+
development_version: ${{ inputs.development_version }}
35+
secrets:
36+
MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }}
37+
MAVEN_REPO_API_KEY: ${{ secrets.MAVEN_REPO_API_KEY }}

0 commit comments

Comments
 (0)