-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Phar releases are needed to be able to use prophecy in projects that are dependencies of prophecy.
- Loading branch information
Showing
6 changed files
with
78 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
on: push | ||
name: Release workflow | ||
jobs: | ||
build-phar: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@master | ||
with: | ||
php-version: 7.4 | ||
ini-values: memory_limit=2G, display_errors=On, error_reporting=-1, phar.readonly=0 | ||
tools: pecl, phive | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: composer- | ||
|
||
- name: Install Composer dependencies | ||
run: | | ||
composer install --no-progress --prefer-dist --optimize-autoloader | ||
- name: Install phive tools | ||
run: phive install | ||
|
||
- name: Create build dir | ||
run: make phar | ||
|
||
- name: Upload PHAR file | ||
uses: actions/[email protected] | ||
with: | ||
name: prophecy-phpunit.phar | ||
path: build/prophecy-phpunit.phar | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
vendor | ||
build | ||
composer.lock | ||
phpunit.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phive xmlns="https://phar.io/phive"> | ||
<phar name="phpab" version="^1.26.0" installed="1.26.0" location="./tools/phpab" copy="true"/> | ||
</phive> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
phar: | ||
mkdir build; | ||
cp -r src build/src; | ||
cp -r vendor build; | ||
rm -r build/vendor/phpspec; | ||
cp manifest.xml build/manifest.xml; | ||
cp LICENSE build/LICENSE | ||
php -dphar.readonly=0 ./tools/phpab --phar -o ./build/prophecy-phpunit.phar --all --hash SHA-1 ./build | ||
|
||
clean: | ||
rm -r build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<phar xmlns="https://phar.io/xml/manifest/1.0"> | ||
<contains name="prophecy/prophecy-phpunit" version="1.0" type="extension"> | ||
<extension for="phpunit/phpunit" compatible="^9.1"/> | ||
</contains> | ||
|
||
<copyright> | ||
<author name="Christophe Coevoet" email="[email protected]"/> | ||
<license type="MIT" url="https://github.com/phpspec/prophecy-phpunit/blob/master/LICENSE"/> | ||
</copyright> | ||
|
||
<requires> | ||
<php version="^7.3 || ^8.0"/> | ||
</requires> | ||
</phar> |