diff --git a/.github/workflows/end-to-end-test-suite.yml b/.github/workflows/end-to-end-test-suite.yml index 054c8c2..2e286f7 100644 --- a/.github/workflows/end-to-end-test-suite.yml +++ b/.github/workflows/end-to-end-test-suite.yml @@ -28,10 +28,10 @@ jobs: include: - m2-version: '2.3.7-p4' php-version: '7.4' - - m2-version: '2.4.5' - php-version: '8.1' - m2-version: '2.4.6' php-version: '8.2' + - m2-version: '2.4.7' + php-version: '8.3' name: End-to-end test suite if: ${{ !contains(github.event.head_commit.message, 'chore(') }} @@ -45,12 +45,12 @@ jobs: - name: Install Magento 2 with DDEV id: magento_install - uses: julienloizelet/magento2-ddev-installation@v2.1.1 + uses: julienloizelet/magento2-ddev-installation@v3 with: php_version: ${{ matrix.php-version }} magento_version: ${{ matrix.m2-version }} composer_auth: ${{ secrets.M2_COMPOSER_AUTH }} - magento_repository: "https://mirror.mage-os.org/" + magento_repository: "https://repo.magento.com/" - name: Add Redis and Memcached run: | @@ -63,7 +63,7 @@ jobs: run: ddev get julienloizelet/ddev-playwright - name: Clone M2 ${{ env.EXTENSION_NAME }} files - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: my-own-modules/${{ env.EXTENSION_PATH }} @@ -80,8 +80,8 @@ jobs: run: | ddev composer require ${{ env.EXTENSION_PACKAGE_NAME }}:@dev --no-interaction - - name: Disable some extensions for 2.4.6 - if: startsWith(matrix.m2-version, '2.4.6') + - name: Disable some extensions for 2.4.6 and superior + if: contains(fromJson('["2.4.6", "2.4.7"]'),matrix.m2-version) run: | ddev magento module:disable Magento_AdminAdobeImsTwoFactorAuth @@ -145,7 +145,7 @@ jobs: run: ddev playwright test reports - name: Keep Playwright report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: playwright-report-${{ matrix.php-version }}-${{ matrix.m2-version }} diff --git a/.github/workflows/installation-and-varnish-test-suite.yml b/.github/workflows/installation-and-varnish-test-suite.yml index b4b2b71..4506754 100644 --- a/.github/workflows/installation-and-varnish-test-suite.yml +++ b/.github/workflows/installation-and-varnish-test-suite.yml @@ -28,8 +28,8 @@ jobs: include: - m2-version: '2.3.7' php-version: '7.4' - - m2-version: '2.4.6' - php-version: '8.2' + - m2-version: '2.4.7' + php-version: '8.3' name: Installation and Varnish test suite # @see https://devdocs.magento.com/marketplace/sellers/installation-and-varnish-tests.html @@ -42,7 +42,7 @@ jobs: steps: - name: Install Magento 2 with DDEV - uses: julienloizelet/magento2-ddev-installation@v2.1.1 + uses: julienloizelet/magento2-ddev-installation@v3 id: magento2-install with: php_version: ${{ matrix.php-version }} @@ -84,8 +84,8 @@ jobs: ddev magento config:set system/full_page_cache/caching_application 2 ddev magento setup:performance:generate-fixtures ./varnish-profile.xml - - name: Disable some extensions for 2.4.6 - if: startsWith(matrix.m2-version, '2.4.6') + - name: Disable some extensions for 2.4.7 + if: startsWith(matrix.m2-version, '2.4.7') run: | ddev magento maintenance:enable ddev magento module:disable --clear-static-content Magento_AdminAdobeImsTwoFactorAuth diff --git a/.github/workflows/markdown.yml b/.github/workflows/markdown.yml index 9a8f7e6..15cd3ff 100644 --- a/.github/workflows/markdown.yml +++ b/.github/workflows/markdown.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Clone sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: extension diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 863cb24..90ce681 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,18 +6,12 @@ on: tag_name: type: string required: true - draft: - type: boolean - description: Draft release - default: false - prerelease: - type: boolean - description: Prerelease - default: false - first-release: - type: boolean - description: First release - default: false + only_zip_for_marketplace: + type: boolean + description: Only create zip for marketplace + required: true + default: true + env: # Allow ddev get to use a GitHub token to prevent rate limiting by tests @@ -51,7 +45,7 @@ jobs: echo "VERSION_SOURCES=$(echo ${{ env.EXTENSION_ZIP_NAME }}-${{ env.VERSION_NUMBER }} )" >> $GITHUB_ENV - name: Clone sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ${{ env.VERSION_SOURCES }} @@ -92,19 +86,16 @@ jobs: fi # Check top [_Compare with previous release_](GITHUB_URL/compare/vLAST_TAG...vVERSION_NUMBER) in CHANGELOG.md - if [[ ${{ github.event.inputs.first-release }} != "true" ]] + COMPARISON=$(grep -oP "\/compare\/\K(.*)$" CHANGELOG.md | head -1) + LAST_TAG=$(curl -Ls -o /dev/null -w %{url_effective} $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/latest | grep -oP "\/tag\/\K(.*)$") + if [[ $COMPARISON == "$LAST_TAG...v${{ env.VERSION_NUMBER }})" ]] then - COMPARISON=$(grep -oP "\/compare\/\K(.*)$" CHANGELOG.md | head -1) - LAST_TAG=$(curl -Ls -o /dev/null -w %{url_effective} $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/latest | grep -oP "\/tag\/\K(.*)$") - if [[ $COMPARISON == "$LAST_TAG...v${{ env.VERSION_NUMBER }})" ]] - then - echo "VERSION COMPARISON OK" - else - echo "VERSION COMPARISON KO" - echo $COMPARISON - echo "$LAST_TAG...v${{ env.VERSION_NUMBER }})" - exit 1 - fi + echo "VERSION COMPARISON OK" + else + echo "VERSION COMPARISON KO" + echo $COMPARISON + echo "$LAST_TAG...v${{ env.VERSION_NUMBER }})" + exit 1 fi - name: Create zip @@ -112,7 +103,7 @@ jobs: zip -r ${{ env.VERSION_SOURCES }}.zip ${{ env.VERSION_SOURCES }}/ -x '${{ env.VERSION_SOURCES }}/.git*' - name: Clone zip validator - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: julienloizelet/m2-extension-zip-validator path: zip-validator @@ -123,6 +114,7 @@ jobs: php zip-validator/validate_m2_package.php ${{ env.VERSION_SOURCES }}.zip - name: Create Tag ${{ github.event.inputs.tag_name }} + if: github.event.inputs.only_zip_for_marketplace != 'true' uses: actions/github-script@v6 with: github-token: ${{ github.token }} @@ -135,12 +127,14 @@ jobs: }) - name: Prepare release notes + if: github.event.inputs.only_zip_for_marketplace != 'true' run: | # Retrieve release body and remove --- VERSION_RELEASE_NOTES=$(awk -v ver="[${{ env.VERSION_NUMBER }}]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/tag/v${{ env.VERSION_NUMBER }})" '/^## / { if (p) { exit }; if ($2 == ver) { p=1; next} } p && NF' ${{ env.VERSION_SOURCES }}/CHANGELOG.md | sed ':a;N;$!ba;s/\n---/ /g') echo "$VERSION_RELEASE_NOTES" >> CHANGELOG.txt - name: Create release ${{ env.VERSION_NUMBER }} + if: github.event.inputs.only_zip_for_marketplace != 'true' uses: softprops/action-gh-release@v1 with: files: ${{ env.VERSION_SOURCES }}.zip @@ -149,3 +143,11 @@ jobs: tag_name: ${{ github.event.inputs.tag_name }} draft: ${{ github.event.inputs.draft }} prerelease: ${{ github.event.inputs.prerelease }} + + - name: Save zip + if: github.event.inputs.only_zip_for_marketplace == 'true' + uses: actions/upload-artifact@v4 + with: + name: ${{ env.VERSION_SOURCES }}.zip + path: ${{ env.VERSION_SOURCES }}.zip + retention-days: 60 diff --git a/.github/workflows/static-test-suite.yml b/.github/workflows/static-test-suite.yml index ee2612f..b47d575 100644 --- a/.github/workflows/static-test-suite.yml +++ b/.github/workflows/static-test-suite.yml @@ -29,8 +29,8 @@ jobs: php-version: '7.4' - m2-version: '2.4.0' php-version: '7.4' - - m2-version: '2.4.6' - php-version: '8.2' + - m2-version: '2.4.7' + php-version: '8.3' name: Static test suite if: ${{ !contains(github.event.head_commit.message, 'chore(') }} @@ -42,7 +42,7 @@ jobs: steps: - name: Install Magento 2 with DDEV - uses: julienloizelet/magento2-ddev-installation@v2.1.1 + uses: julienloizelet/magento2-ddev-installation@v3 with: php_version: ${{ matrix.php-version }} magento_version: ${{ matrix.m2-version }} @@ -50,7 +50,7 @@ jobs: magento_repository: "https://repo.magento.com/" - name: Clone extension files - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: my-own-modules/${{ env.EXTENSION_PATH }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 71eea7b..e6970a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- +## [1.1.1](https://github.com/crowdsecurity/magento-cs-extension/releases/tag/v1.1.1) - 2024-04-12 +[_Compare with previous release_](https://github.com/crowdsecurity/magento-cs-extension/compare/v1.1.0...v1.1.1) + + +### Changed + +- No change: released on marketplace to confirm compatibility with Magento 2.4.7 and PHP 8.3 + +--- + ## [1.1.0](https://github.com/crowdsecurity/magento-cs-extension/releases/tag/v1.1.0) - 2024-01-05 [_Compare with previous release_](https://github.com/crowdsecurity/magento-cs-extension/compare/v1.0.0...v1.1.0) diff --git a/Constants.php b/Constants.php index c09edee..ec84507 100644 --- a/Constants.php +++ b/Constants.php @@ -49,5 +49,5 @@ class Constants extends CapiConstants /** @var string The user agent suffix used to send request to CAPI */ public const USER_AGENT_SUFFIX = 'magento2'; /** @var string The last version of this module */ - public const VERSION = 'v1.1.0'; + public const VERSION = 'v1.1.1'; } diff --git a/composer.json b/composer.json index b2cd657..0e5498f 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "crowdsec/magento2-module-engine", "description": "This Magento 2 module allows sharing threat signal and benefit from the CrowdSec's community blocklist.", "type": "magento2-module", - "version": "1.1.0", + "version": "1.1.1", "minimum-stability": "stable", "license": "MIT", "authors": [ diff --git a/doc/DEVELOPER.md b/doc/DEVELOPER.md index 183e72b..077aec1 100644 --- a/doc/DEVELOPER.md +++ b/doc/DEVELOPER.md @@ -164,8 +164,8 @@ Tests must be run sequentially (`fullyParallel: false` in the `playwright.config ddev get julienloizelet/ddev-crowdsec-php cp .ddev/okaeli-add-on/magento2/custom_files/crowdsec/engine/docker-compose.override.yaml .ddev/docker-compose.override.yaml ddev magento config:set crowdsec_engine/general/enrollment_key -cp .ddev/okaeli-add-on/magento2/custom_scripts/cronLaunch.php ${{ github.workspace }}/pub/cronLaunch.php -cp .ddev/okaeli-add-on/magento2/custom_scripts/crowdsec/engine/runActions.php ${{ github.workspace }}/pub/runActions.php +cp .ddev/okaeli-add-on/magento2/custom_scripts/cronLaunch.php pub/cronLaunch.php +cp .ddev/okaeli-add-on/magento2/custom_scripts/crowdsec/engine/runActions.php pub/runActions.php ddev restart ddev playwright-install ```