diff --git a/.github/workflows/release-phar.yml b/.github/workflows/release-phar.yml index aa8e8f3b..1b838370 100644 --- a/.github/workflows/release-phar.yml +++ b/.github/workflows/release-phar.yml @@ -4,61 +4,47 @@ name: "Release PHAR" on: release: - types: - - published + types: [published] jobs: - release-phar: - name: "Release PHAR" + build: + name: "Building and upload PHAR artifact" - runs-on: ${{ matrix.operating-system }} - - strategy: - matrix: - dependencies: - - "locked" - php-version: - - "7.4" - operating-system: - - "ubuntu-latest" + runs-on: "ubuntu-latest" steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v2" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: - coverage: "pcov" - php-version: "${{ matrix.php-version }}" - ini-values: memory_limit=-1 - - - name: "Cache dependencies" - uses: "actions/cache@v3" - with: - path: | - ~/.composer/cache - vendor - key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" - restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" - - - name: "Install lowest dependencies" - if: ${{ matrix.dependencies == 'lowest' }} - run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest" + coverage: "none" + php-version: "8.0" + ini-values: memory_limit=-1, phar.readonly=0 - - name: "Install highest dependencies" - if: ${{ matrix.dependencies == 'highest' }} - run: "composer update --no-interaction --no-progress --no-suggest" + - name: "Import GPG Key" + run: echo "$PRIVATE_KEY" | gpg --import + env: + PRIVATE_KEY: ${{ secrets.SIGNING_SECRET_KEY }} - - name: "Install locked dependencies" - if: ${{ matrix.dependencies == 'locked' }} + - name: "Install dependencies for build environment" run: "composer install --no-interaction --no-progress --no-suggest" - - name: "build-phar.sh" - run: "build-phar.sh" + - name: "Build and sign phar file via phing" + run: "vendor/bin/phing phar-build phar-sign" - - name: "Upload PHAR" - uses: fnkr/github-action-ghr@v1 - env: - GHR_PATH: dist/ - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: "Upload phar file artifact" + uses: actions/upload-artifact@v2 + with: + name: composer-require-checker.phar + path: | + build/composer-require-checker.phar + build/composer-require-checker.phar.asc + - name: Upload PHAR to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: build/composer-require-checker.phar* + file_glob: true + tag: ${{ github.ref }} diff --git a/.gitignore b/.gitignore index 579f1a00..e42d013f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ phpstan.neon phpunit.xml phpcs.xml .phpunit.result.cache +/bin/clistub.php +/build/ diff --git a/build.xml b/build.xml new file mode 100644 index 00000000..95069e14 --- /dev/null +++ b/build.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/composer.json b/composer.json index 440d5943..076ba631 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,7 @@ ], "require-dev": { "doctrine/coding-standard": "^9.0.0", + "phing/phing": "^2.17", "php-standard-library/psalm-plugin": "^1.1.5", "phpunit/phpunit": "^9.5.20", "psalm/plugin-phpunit": "^0.16.1", diff --git a/composer.lock b/composer.lock index 1eec5538..9e0e0b5f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2c6a223d393e771b3cc36f43ff87f0c7", + "content-hash": "02e8da008b00aac681121df97a1f0033", "packages": [ { "name": "azjezz/psl", @@ -3489,6 +3489,118 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phing/phing", + "version": "2.17.3", + "source": { + "type": "git", + "url": "https://github.com/phingofficial/phing.git", + "reference": "053cb496cf49608d19f85664d85d71c48b241667" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phingofficial/phing/zipball/053cb496cf49608d19f85664d85d71c48b241667", + "reference": "053cb496cf49608d19f85664d85d71c48b241667", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "ext-pdo_sqlite": "*", + "mikey179/vfsstream": "^1.6", + "pdepend/pdepend": "2.x", + "pear/archive_tar": "1.4.x", + "pear/http_request2": "dev-trunk", + "pear/net_growl": "dev-trunk", + "pear/pear-core-minimal": "1.10.1", + "pear/versioncontrol_git": "@dev", + "pear/versioncontrol_svn": "~0.5", + "phpdocumentor/phpdocumentor": "2.x", + "phploc/phploc": "~2.0.6", + "phpmd/phpmd": "~2.2", + "phpunit/phpunit": ">=3.7", + "sebastian/git": "~1.0", + "sebastian/phpcpd": "2.x", + "siad007/versioncontrol_hg": "^1.0", + "simpletest/simpletest": "^1.1", + "squizlabs/php_codesniffer": "~2.2", + "symfony/yaml": "^2.8 || ^3.1 || ^4.0" + }, + "suggest": { + "pdepend/pdepend": "PHP version of JDepend", + "pear/archive_tar": "Tar file management class", + "pear/versioncontrol_git": "A library that provides OO interface to handle Git repository", + "pear/versioncontrol_svn": "A simple OO-style interface for Subversion, the free/open-source version control system", + "phpdocumentor/phpdocumentor": "Documentation Generator for PHP", + "phploc/phploc": "A tool for quickly measuring the size of a PHP project", + "phpmd/phpmd": "PHP version of PMD tool", + "phpunit/php-code-coverage": "Library that provides collection, processing, and rendering functionality for PHP code coverage information", + "phpunit/phpunit": "The PHP Unit Testing Framework", + "sebastian/phpcpd": "Copy/Paste Detector (CPD) for PHP code", + "siad007/versioncontrol_hg": "A library for interfacing with Mercurial repositories.", + "tedivm/jshrink": "Javascript Minifier built in PHP" + }, + "bin": [ + "bin/phing" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.16.x-dev" + } + }, + "autoload": { + "classmap": [ + "classes/phing/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "classes" + ], + "license": [ + "LGPL-3.0-only" + ], + "authors": [ + { + "name": "Michiel Rook", + "email": "mrook@php.net" + }, + { + "name": "Phing Community", + "homepage": "https://www.phing.info/trac/wiki/Development/Contributors" + } + ], + "description": "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.", + "homepage": "https://www.phing.info/", + "keywords": [ + "build", + "phing", + "task", + "tool" + ], + "support": { + "irc": "irc://irc.freenode.net/phing", + "issues": "https://www.phing.info/trac/report", + "source": "https://github.com/phingofficial/phing/tree/2.17.3" + }, + "funding": [ + { + "url": "https://github.com/mrook", + "type": "github" + }, + { + "url": "https://github.com/siad007", + "type": "github" + }, + { + "url": "https://www.patreon.com/michielrook", + "type": "patreon" + } + ], + "time": "2022-05-04T19:17:50+00:00" + }, { "name": "php-standard-library/psalm-plugin", "version": "1.1.5", @@ -6395,5 +6507,5 @@ "platform-overrides": { "php": "8.0.99" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" }