From 984aa99388af53d5a52a784cb8ff883ca05c9a39 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev Date: Thu, 12 Mar 2020 19:59:18 +0000 Subject: [PATCH] #12 - Implement release-phar.yml --- .github/workflows/release-phar.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/release-phar.yml diff --git a/.github/workflows/release-phar.yml b/.github/workflows/release-phar.yml new file mode 100644 index 0000000..30408ca --- /dev/null +++ b/.github/workflows/release-phar.yml @@ -0,0 +1,32 @@ +on: + release: + types: + - created + +name: Upload Phar to Release + +jobs: + build: + name: Compile and upload Phar + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Compile phalcon-migrations.phar + run: | + composer install --ignore-platform-reqs + vendor/bin/box compile + + - name: Check existence of compiled .phar + run: test -e phalcon-migrations.phar && exit 0 || exit 10 + + - name: Upload to Release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./phalcon-migrations.phar + asset_name: phalcon-migrations.phar + asset_content_type: application/octet-stream