diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml index a5150e4..92073f5 100644 --- a/.github/actions/install/action.yml +++ b/.github/actions/install/action.yml @@ -30,24 +30,11 @@ runs: run: | COMPOSER_ROOT_VERSION= - COMPOSER_BRANCH_ALIAS="$(php -r " - \$json = json_decode(file_get_contents('./composer.json'), true); - if (\$json !== null) { - if (isset(\$json['extra']['branch-alias']['dev-$GITHUB_REF_NAME'])) { - echo 'dev-$GITHUB_REF_NAME'; - } - } - ")" - - if [ -z "$COMPOSER_BRANCH_ALIAS" ]; then - PICO_VERSION_PATTERN="$(php -r " + if [ -z "$(composer config extra.branch-alias."dev-$GITHUB_REF_NAME")" ]; then + COMPOSER_ROOT_VERSION="$(php -r " require('./lib/Pico.php'); echo preg_replace('/\.[0-9]+-dev$/', '.x-dev', Pico::VERSION); ")" - fi - - if [ -n "$PICO_VERSION_PATTERN" ]; then - COMPOSER_ROOT_VERSION="$PICO_VERSION_PATTERN" echo "COMPOSER_ROOT_VERSION=$COMPOSER_ROOT_VERSION" | tee -a "$GITHUB_ENV" fi