diff --git a/.github/workflows/gh_release.yml b/.github/workflows/gh_release.yml index 35601dfee..6e35a2442 100644 --- a/.github/workflows/gh_release.yml +++ b/.github/workflows/gh_release.yml @@ -1,16 +1,20 @@ -name: Github Release +name: Automatic Github release on: - workflow_dispatch: - push: - branches: - - main + workflow_dispatch: + push: + branches: + - main + paths: + - VERSION jobs: - gh_release: + github: permissions: contents: write - uses: Adyen/adyen-node-api-library/.github/workflows/lib-gh-release.yml@develop + uses: Adyen/release-automation-action/.github/workflows/reusable-github-release.yml@v1.1.1 with: - project-name: PHP - secrets: inherit + release-title: Adyen PHP API Library + develop-branch: main + secrets: + token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }} diff --git a/.github/workflows/models.yml b/.github/workflows/models.yml index 1964eb528..2e6e67e93 100644 --- a/.github/workflows/models.yml +++ b/.github/workflows/models.yml @@ -31,7 +31,7 @@ jobs: token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }} committer: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }} author: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }} - base: develop + base: main branch: automation/models title: ${{ steps.vars.outputs.pr_title }} body: ${{ steps.vars.outputs.pr_body }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..fbf7bf488 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Prepare release + +on: + workflow_dispatch: + inputs: + pre-release: + required: false + type: boolean + default: false + description: "This release will be labeled as non-production ready" + pull_request: + types: + - closed + branches: + - main + +jobs: + candidate: + if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged && !startsWith(github.head_ref, 'promote/')) + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Prepare the next main release + uses: Adyen/release-automation-action@v1.1.1 + with: + token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }} + develop-branch: main + version-files: src/Adyen/Client.php README.md + pre-release: ${{ inputs.pre-release || false }} diff --git a/.github/workflows/release_request.yml b/.github/workflows/release_request.yml deleted file mode 100644 index b437f0925..000000000 --- a/.github/workflows/release_request.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Release request - -on: - workflow_dispatch: - inputs: - prerelease: - required: false - type: boolean - default: false - description: "This release will be labeled as non-production ready" - push: - branches: - - develop - -jobs: - release: - permissions: - contents: write - pull-requests: write - uses: Adyen/adyen-node-api-library/.github/workflows/lib-release.yml@develop - with: - prerelease: ${{ inputs.prerelease || false }} - secrets: inherit diff --git a/.github/workflows/services.yml b/.github/workflows/services.yml index edf7f30d1..5e616fa32 100644 --- a/.github/workflows/services.yml +++ b/.github/workflows/services.yml @@ -31,7 +31,7 @@ jobs: token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }} committer: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }} author: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }} - base: develop + base: main branch: automation/services title: ${{ steps.vars.outputs.pr_title }} body: ${{ steps.vars.outputs.pr_body }} diff --git a/Makefile b/Makefile index dce77209f..f9b654d5c 100644 --- a/Makefile +++ b/Makefile @@ -136,13 +136,4 @@ clean: git checkout $(models) git clean -f -d $(models) - -## Releases - -version: - perl -lne 'print "currentVersion=$$1" if /LIB_VERSION = "(.+)";/' < src/Adyen/Client.php >> "$$GITHUB_OUTPUT" - -bump: - perl -i -pe 's/$$ENV{"CURRENT_VERSION"}/$$ENV{"NEXT_VERSION"}/' src/Adyen/Client.php - -.PHONY: templates models $(services) version bump +.PHONY: templates models $(services) diff --git a/README.md b/README.md index 834e36547..976707cd4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is the officially supported PHP library for using Adyen's APIs. -[![version](https://img.shields.io/badge/version-14.0.1-blue.svg)](https://docs.adyen.com/development-resources/libraries) +[![version](https://img.shields.io/badge/version-16.0.0-blue.svg)](https://docs.adyen.com/development-resources/libraries) ## Supported API versions The library supports all APIs under the following services: diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..946789e61 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +16.0.0