diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 000000000..94a7ac259 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,56 @@ +name: Release + +on: + push: + + # Manual run from Github UI (e.g. for when a merged PR labels have changed) + workflow_dispatch: + inputs: + pre-release: + required: false + type: boolean + default: false + description: "This release will be labeled as non-production ready" + # Publish the current version now, useful if the automated run failed + github-release: + required: false + type: boolean + default: false + description: "Publish Github release for the current version" + # Monitor pull request events + + pull_request: + types: + - closed + # TODO: 'develop' is for testing only, change this value to 'main' before merging to main + branches: + - develop + +jobs: + release: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: +# TODO: Remove after finalising + - name: Checkout + uses: actions/checkout@v4 + - name: Debug + run: | + ls -la + cat VERSION + + - name: Prepare the next main release + uses: Adyen/release-automation-action@v1.3.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + # TODO: change this value to 'main' before merging to 'main', this value should be the same as 'on->pull_request->branches' + develop-branch: develop + version-files: composer.json + release-title: Adyen Magento-2 Plugin + pre-release: ${{ inputs.pre-release || false }} + # For a manual Github release + github-release: ${{ inputs.github-release || false }} + separator: .pre.beta + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 68772eef6..b69d04702 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: php-version: [8.2,8.3] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..555763f7f --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +9.5.2