diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..2386535 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,89 @@ +name: phar build + +on: [push] + +jobs: + analysis: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run PHPStan + run: composer phpstan + + build: + runs-on: ubuntu-latest + + needs: + - analysis + + steps: + - uses: actions/checkout@v1 + + - name: Setup PHP + uses: shivammathur/setup-php@v1 + with: + php-version: '7.3' + extensions: ctype, intl, json, mbstring, mysqli, pdo + coverage: none + + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: | + sed -i "s#^MAILER_DSN=.*\$#MAILER_DSN=${{ secrets.MAILER_DSN }}#" .env + composer install --prefer-dist --no-progress --no-dev --optimize-autoloader + composer dump-env prod + bin/console cache:clear + bin/console cache:warmup + + - name: Build phar + uses: docker://php:7.3-cli-alpine3.10 + with: + args: "/bin/sh -c \"apk --no-cache add git && curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer && curl -LO https://github.com/humbug/box/releases/download/3.8.3/box.phar && mv box.phar /usr/local/bin/box && chmod +x /usr/local/bin/box && box compile && chmod 755 pwmgr.phar\"" + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Upload Release phar + id: upload-release-asset + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./pwmgr.phar + asset_name: pwmgr.phar + asset_content_type: application/octet-stream diff --git a/composer.json b/composer.json index e3d719f..705112b 100644 --- a/composer.json +++ b/composer.json @@ -60,7 +60,6 @@ }, "replace": { "paragonie/random_compat": "2.*", - "symfony/polyfill-ctype": "*", "symfony/polyfill-iconv": "*", "symfony/polyfill-php71": "*", "symfony/polyfill-php70": "*", diff --git a/composer.lock b/composer.lock index a9fecb2..70edb58 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": "abe629439ae9695bc0e95584687df33b", + "content-hash": "ad4e274a45c03d8b12fb526fa1288f78", "packages": [ { "name": "doctrine/cache", @@ -2335,6 +2335,64 @@ ], "time": "2019-11-13T13:11:14+00:00" }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.13.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.13-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-11-27T13:56:44+00:00" + }, { "name": "symfony/polyfill-intl-idn", "version": "v1.13.1", @@ -3927,24 +3985,27 @@ }, { "name": "zendframework/zend-code", - "version": "3.4.0", + "version": "3.4.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-code.git", - "reference": "46feaeecea14161734b56c1ace74f28cb329f194" + "reference": "268040548f92c2bfcba164421c1add2ba43abaaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-code/zipball/46feaeecea14161734b56c1ace74f28cb329f194", - "reference": "46feaeecea14161734b56c1ace74f28cb329f194", + "url": "https://api.github.com/repos/zendframework/zend-code/zipball/268040548f92c2bfcba164421c1add2ba43abaaa", + "reference": "268040548f92c2bfcba164421c1add2ba43abaaa", "shasum": "" }, "require": { "php": "^7.1", "zendframework/zend-eventmanager": "^2.6 || ^3.0" }, + "conflict": { + "phpspec/prophecy": "<1.9.0" + }, "require-dev": { - "doctrine/annotations": "^1.0", + "doctrine/annotations": "^1.7", "ext-phar": "*", "phpunit/phpunit": "^7.5.16 || ^8.4", "zendframework/zend-coding-standard": "^1.0", @@ -3958,7 +4019,8 @@ "extra": { "branch-alias": { "dev-master": "3.4.x-dev", - "dev-develop": "3.5.x-dev" + "dev-develop": "3.5.x-dev", + "dev-dev-4.0": "4.0.x-dev" } }, "autoload": { @@ -3976,7 +4038,7 @@ "code", "zf" ], - "time": "2019-10-05T23:18:22+00:00" + "time": "2019-12-10T19:21:15+00:00" }, { "name": "zendframework/zend-eventmanager", diff --git a/symfony.lock b/symfony.lock index a697cef..91e9c91 100644 --- a/symfony.lock +++ b/symfony.lock @@ -421,6 +421,9 @@ "tests/.gitignore" ] }, + "symfony/polyfill-ctype": { + "version": "v1.13.1" + }, "symfony/polyfill-intl-idn": { "version": "v1.12.0" },