From fb862cbc6d1e445d13c35998bf59ce8f7779a3a6 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Tue, 19 Dec 2023 11:28:42 +1100 Subject: [PATCH] Add build-and-publish workflow --- .github/workflows/build-and-publish.yaml | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build-and-publish.yaml diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml new file mode 100644 index 0000000..a22bd54 --- /dev/null +++ b/.github/workflows/build-and-publish.yaml @@ -0,0 +1,37 @@ +name: Build and Publish JAR Packages +on: + workflow_dispatch: + inputs: + release_type: + type: choice + description: 'The type of release' + options: + - Major + - Minor + - Patch + - Snapshot + publish_to_maven: + description: 'True to publish the artifacts to Maven repository, false to skip the step' + default: false + required: false + type: boolean + java_version: + type: string + default: '11' + publish_vulnerabilities: + type: string + default: 'true' + pull_request: + +jobs: + build-and-pubish: + name: Build and publish JAR packages to Maven repository + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-java-publish-versioned-package.yaml + with: + ref: kcc-UID2-2327-update-maven-repos-to-use-new-pipelines + release_type: ${{ inputs.release_type }} + publish_to_maven: ${{ inputs.publish_to_maven }} + java_version: ${{ inputs.java_version }} + publish_vulnerabilities: ${{ inputs.publish_vulnerabilities }} + pom_path: attestation-aws/pom.xml + secrets: inherit