From 0a63d6a2b5417a1fd4881738c226c9ea5e8b87c6 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Mon, 18 Dec 2023 11:04:05 +1100 Subject: [PATCH 1/2] Add build and publish pipeline --- .github/workflows/build-and-publish.yaml | 35 ++++++++++++++++++++++++ 1 file changed, 35 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..0c90607 --- /dev/null +++ b/.github/workflows/build-and-publish.yaml @@ -0,0 +1,35 @@ +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@v2.7 + with: + release_type: ${{ inputs.release_type }} + publish_to_maven: ${{ inputs.publish_to_maven }} + java_version: ${{ inputs.java_version }} + publish_vulnerabilities: ${{ inputs.publish_vulnerabilities }} + secrets: inherit From 2ccb39be1f70901cf6a3c3d95717762e9ac73ae0 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Mon, 18 Dec 2023 11:05:18 +1100 Subject: [PATCH 2/2] Remove `pull_request` workflow --- .github/workflows/build-and-publish.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index 0c90607..307bde4 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -21,7 +21,6 @@ on: publish_vulnerabilities: type: string default: 'true' - pull_request: jobs: build-and-pubish: