From 310dd489ae36cb5a9f3c526e6bd9cadf011aa1d9 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Wed, 3 Apr 2024 09:41:10 +0200 Subject: [PATCH] fix release automation action (#642) * fix release automation action * Delete .github/workflows/gh_release.yml No loner required as the main release action takes care of this functionality * fix copy paste bug * fix copy/paste bug --- .github/workflows/gh_release.yml | 20 -------------------- .github/workflows/release.yml | 14 +++++++++++--- 2 files changed, 11 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/gh_release.yml diff --git a/.github/workflows/gh_release.yml b/.github/workflows/gh_release.yml deleted file mode 100644 index 3dcffaebb..000000000 --- a/.github/workflows/gh_release.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Automatic Github release - -on: - workflow_dispatch: - push: - branches: - - main - paths: - - VERSION - -jobs: - github: - permissions: - contents: write - uses: Adyen/release-automation-action/.github/workflows/reusable-github-release.yml@v1.3.1 - with: - release-title: Adyen PHP API Library - develop-branch: main - secrets: - token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab345f934..152917c0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Prepare release +name: Release on: workflow_dispatch: @@ -8,6 +8,12 @@ on: type: boolean default: false description: "This release will be labeled as non-production ready" + github-release: + required: false + type: boolean + default: false + description: "Publish Github release for the current version" + # Monitor pull request events pull_request: types: - closed @@ -15,8 +21,7 @@ on: - main jobs: - candidate: - if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged && !startsWith(github.head_ref, 'promote/')) + release: permissions: contents: write pull-requests: write @@ -29,4 +34,7 @@ jobs: token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }} develop-branch: main version-files: src/Adyen/Client.php README.md + release-title: Adyen PHP API Library pre-release: ${{ inputs.pre-release || false }} + github-release: ${{ inputs.github-release || false }} + separator: .pre.beta