From f7ecabc15ef720b8c1536b04b879ca8f8cf4881d Mon Sep 17 00:00:00 2001 From: fishinitself Date: Fri, 6 Oct 2023 13:54:59 +0300 Subject: [PATCH] Check released artifact at maven.org and then register release (#40) * Create check-and-register.yml * Create release.yml * Bump template version to 2.1.7 --------- Co-authored-by: Konstantin Zaporozhtsev <51118814+octopusden@users.noreply.github.com> --- .github/release.yml | 17 +++++++++++++++++ .github/workflows/build.yml | 2 +- .github/workflows/check-and-register.yml | 15 +++++++++++++++ .github/workflows/release.yml | 2 +- 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .github/release.yml create mode 100644 .github/workflows/check-and-register.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..c820317 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,17 @@ +# .github/release.yml + +changelog: + categories: + - title: New features and enhancements + labels: + - '*' + exclude: + labels: + - dependencies + - bug + - title: Bugfixes + labels: + - bug + - title: Dependencies + labels: + - dependencies diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e07a011..d787167 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch] jobs: run-build-and-deploy: - uses: octopusden/octopus-base/.github/workflows/common-java-gradle-build.yml@v2.1.3 + uses: octopusden/octopus-base/.github/workflows/common-java-gradle-build.yml@v2.1.7 with: flow-type: hybrid java-version: '11' diff --git a/.github/workflows/check-and-register.yml b/.github/workflows/check-and-register.yml new file mode 100644 index 0000000..21d62a6 --- /dev/null +++ b/.github/workflows/check-and-register.yml @@ -0,0 +1,15 @@ +name: Check for artifact and register release + +on: + workflow_run: + workflows: ["Gradle Release"] + types: + - completed + +jobs: + build: + uses: octopusden/octopus-base/.github/workflows/common-check-and-register-release.yml@2.1.7 + if: "${{ github.event.workflow_run.conclusion == 'success' }}" + with: + artifact-pattern: "octopus-employee/employee-service/_VER_/employee-service-_VER_.jar" + secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b71cedb..0a3758a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: jobs: build: - uses: octopusden/octopus-base/.github/workflows/common-java-gradle-release.yml@v2.1.3 + uses: octopusden/octopus-base/.github/workflows/common-java-gradle-release.yml@v2.1.7 with: flow-type: hybrid java-version: '11'