diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c3e3d97 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Upload Release PHAR + +on: + release: + types: [published] + +jobs: + build: + name: Upload Release PHAR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + + - name: Composer install + run: composer install + + - run: composer global require humbug/box:^4.6 + + - name: Compile PHAR + run: ~/.composer/vendor/bin/box compile + + - name: Upload Release Asset + id: upload-release-asset + uses: softprops/action-gh-release@v1 + with: + files: logchecker.phar diff --git a/box.json b/box.json new file mode 100644 index 0000000..41a29a7 --- /dev/null +++ b/box.json @@ -0,0 +1,35 @@ +{ + "alias": "logchecker.phar", + "compactors": [ + "KevinGH\\Box\\Compactor\\Json", + "KevinGH\\Box\\Compactor\\Php" + ], + "directories": ["src"], + "exclude-composer-files": false, + "files": [ + "bin/logchecker", + "composer.json", + "LICENSE.md" + ], + "finder": [ + { + "name": "*.php", + "exclude": [ + "File", + "mikey179", + "Net", + "phpunit", + "phpunit-test-case", + "Tester", + "Tests", + "tests" + ], + "in": "vendor" + }, + { + "name": "composer.json", + "in": "." + } + ], + "output": "logchecker.phar" +}