diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 51042aef..50fbe450 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,21 +1,49 @@ version: 2 updates: + # GitHub Actions - main branch - package-ecosystem: "github-actions" directory: "/" + target-branch: "main" schedule: interval: "monthly" labels: - - 'skip-changelog' - - 'dependencies' - rebase-strategy: disabled + - "skip-changelog" + - "dependencies" + rebase-strategy: "disabled" - - package-ecosystem: composer + # GitHub Actions - v1.x branch + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "v1.x" + schedule: + interval: "monthly" + labels: + - "skip-changelog" + - "dependencies" + rebase-strategy: "disabled" + + # Composer - main branch + - package-ecosystem: "composer" + directory: "/" + target-branch: "main" + schedule: + interval: "monthly" + time: "04:00" + open-pull-requests-limit: 10 + labels: + - "skip-changelog" + - "dependencies" + rebase-strategy: "disabled" + + # Composer - v1.x branch + - package-ecosystem: "composer" directory: "/" + target-branch: "v1.x" schedule: interval: "monthly" time: "04:00" open-pull-requests-limit: 10 labels: - - skip-changelog - - dependencies - rebase-strategy: disabled + - "skip-changelog" + - "dependencies" + rebase-strategy: "disabled" diff --git a/.github/release-draft-template-v1.yml b/.github/release-draft-template-v1.yml new file mode 100644 index 00000000..e0c373e1 --- /dev/null +++ b/.github/release-draft-template-v1.yml @@ -0,0 +1,47 @@ +name-template: "v$RESOLVED_VERSION 🔒" +tag-template: "v$RESOLVED_VERSION" +exclude-labels: + - "skip-changelog" +version-resolver: + major: + labels: + - "breaking-change" + minor: + labels: + - "enhancement" + default: patch +categories: + - title: "⚠️ Breaking changes" + label: "breaking-change" + - title: "🚀 Enhancements" + label: "enhancement" + - title: "🐛 Bug Fixes" + label: "bug" + - title: "🔒 Security" + label: "security" + - title: "⚙️ Maintenance/misc" + label: + - "maintenance" + - "documentation" +template: | + ## What's Changed in v1.x + + This is a maintenance release for the v1.x series. For the latest features and improvements, please consider upgrading to v2.x. + + $CHANGES + + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION + + Thanks to all contributors! 🎉 + $CONTRIBUTORS +no-changes-template: "Changes are coming soon 😎" +sort-direction: "ascending" +replacers: + - search: '/(?:and )?@dependabot-preview(?:\[bot\])?,?/g' + replace: "" + - search: '/(?:and )?@meili-bors(?:\[bot\])?,?/g' + replace: "" + - search: "/(?:and )?@meili-bot,?/g" + replace: "" + - search: '/(?:and )?@dependabot(?:\[bot\])?,?/g' + replace: "" diff --git a/.github/release-draft-template.yml b/.github/release-draft-template.yml index 0367297c..df60c01c 100644 --- a/.github/release-draft-template.yml +++ b/.github/release-draft-template.yml @@ -1,40 +1,46 @@ -name-template: 'v$RESOLVED_VERSION 🐘' -tag-template: 'v$RESOLVED_VERSION' +name-template: "v$RESOLVED_VERSION 🚀" +tag-template: "v$RESOLVED_VERSION" exclude-labels: - - 'skip-changelog' + - "skip-changelog" version-resolver: major: labels: - - 'breaking-change' + - "breaking-change" minor: labels: - - 'enhancement' + - "enhancement" default: patch +# Set initial version for v2.x releases +version-template: "2.0.0" categories: - - title: '⚠️ Breaking changes' - label: 'breaking-change' - - title: '🚀 Enhancements' - label: 'enhancement' - - title: '🐛 Bug Fixes' - label: 'bug' - - title: '🔒 Security' - label: 'security' - - title: '⚙️ Maintenance/misc' + - title: "⚠️ Breaking changes" + label: "breaking-change" + - title: "🚀 Enhancements" + label: "enhancement" + - title: "🐛 Bug Fixes" + label: "bug" + - title: "🔒 Security" + label: "security" + - title: "⚙️ Maintenance/misc" label: - - 'maintenance' - - 'documentation' + - "maintenance" + - "documentation" template: | + ## What's Changed $CHANGES - Thanks again to $CONTRIBUTORS! 🎉 -no-changes-template: 'Changes are coming soon 😎' -sort-direction: 'ascending' + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION + + Thanks to all contributors! 🎉 + $CONTRIBUTORS +no-changes-template: "Changes are coming soon 😎" +sort-direction: "ascending" replacers: - search: '/(?:and )?@dependabot-preview(?:\[bot\])?,?/g' - replace: '' + replace: "" - search: '/(?:and )?@meili-bors(?:\[bot\])?,?/g' - replace: '' - - search: '/(?:and )?@meili-bot,?/g' - replace: '' + replace: "" + - search: "/(?:and )?@meili-bot,?/g" + replace: "" - search: '/(?:and )?@dependabot(?:\[bot\])?,?/g' - replace: '' + replace: "" diff --git a/.github/workflows/meilisearch-beta-tests.yml b/.github/workflows/meilisearch-beta-tests.yml index fbabae6d..a45abef8 100644 --- a/.github/workflows/meilisearch-beta-tests.yml +++ b/.github/workflows/meilisearch-beta-tests.yml @@ -47,7 +47,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-versions }} + php-version: ${{ matrix.php-version }} - name: Validate composer.json and composer.lock run: composer validate diff --git a/.github/workflows/pre-release-tests.yml b/.github/workflows/pre-release-tests.yml index 91bdc90a..b32fe2a7 100644 --- a/.github/workflows/pre-release-tests.yml +++ b/.github/workflows/pre-release-tests.yml @@ -27,7 +27,7 @@ jobs: tests: runs-on: ubuntu-latest needs: ['meilisearch-version'] - name: integration-tests-against-rc (PHP ${{ matrix.php-versions }}) + name: integration-tests-against-rc (PHP ${{ matrix.php-version }}) services: meilisearch: image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }} @@ -47,7 +47,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-versions }} + php-version: ${{ matrix.php-version }} coverage: none - name: Validate composer.json and composer.lock diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 49fbecc2..645a9ada 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -12,6 +12,6 @@ jobs: steps: - uses: release-drafter/release-drafter@v6 with: - config-name: release-draft-template.yml + config-name: ${{ github.ref_name == 'v1.x' && 'release-draft-template-v1.yml' || 'release-draft-template.yml' }} env: GITHUB_TOKEN: ${{ secrets.RELEASE_DRAFTER_TOKEN }} diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index 803422ce..feb83c79 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -6,6 +6,13 @@ on: new_version: description: 'The new version (vX.Y.Z)' required: true + target_branch: + description: 'Target branch for the version update' + required: true + type: choice + options: + - main + - v1.x env: NEW_VERSION: ${{ github.event.inputs.new_version }} @@ -18,6 +25,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.target_branch }} - name: Update Meilisearch.php file run: | raw_new_version=$(echo $NEW_VERSION | cut -d 'v' -f 2) @@ -28,10 +37,11 @@ jobs: with: message: "Update version for the next release (${{ env.NEW_VERSION }}) in Meilisearch.php" new_branch: ${{ env.NEW_BRANCH }} - - name: Create the PR pointing to ${{ github.ref_name }} + - name: Create the PR pointing to ${{ github.event.inputs.target_branch }} run: | gh pr create \ --title "Update version for the next release ($NEW_VERSION)" \ --body '⚠️ This PR is automatically generated. Check the new version is the expected one.' \ --label 'skip-changelog' \ - --base $GITHUB_REF_NAME + --base ${{ github.event.inputs.target_branch }} \ + --head ${{ env.NEW_BRANCH }}