Setup release workflow to upload built phar

This commit is contained in:
itismadness
2023-12-19 22:20:14 +00:00
parent ea2e612319
commit 35240df211
2 changed files with 67 additions and 0 deletions

32
.github/workflows/release.yml vendored Normal file
View File

@@ -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

35
box.json Normal file
View File

@@ -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"
}