diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad2dd4e..3ff18cd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,26 +7,15 @@ on: branches: [ main ] workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: build: - strategy: - matrix: - platform: [ ubuntu-latest ] - java-version: [ 8 ] - - runs-on: ${{ matrix.platform }} - env: - PLATFORM: ${{ matrix.platform }} - JAVA_VERSION: ${{ matrix.java-version }} - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ matrix.java-version }} - - name: Build with Maven - id: build_with_maven - run: | - mvn clean verify --batch-mode --file pom.xml + uses: openmrs/openmrs-contrib-gha-workflows/.github/workflows/build-maven.yml@main + with: + java_versions: 8 + secrets: + MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }} + MAVEN_REPO_API_KEY: ${{ secrets.MAVEN_REPO_API_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bdfc970 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +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., main)' + required: false + default: 'main' + +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 }} + secrets: + MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }} + MAVEN_REPO_API_KEY: ${{ secrets.MAVEN_REPO_API_KEY }} + BOT_PAT: ${{ secrets.OMRS_BOT_GH_TOKEN }} + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}