diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 28bdbeb1..e2a4ff4f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -77,3 +77,35 @@ jobs: - name: Execute tests (Unit and Feature tests) via Pest run: vendor/bin/pest + + build-executable: + runs-on: ubuntu-latest + name: Build executable + + steps: + - uses: actions/checkout@v3 + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --no-interaction --no-progress --no-suggest --prefer-dist + + - name: Get build version + id: build-version + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Build executable + run: php hyde standalone:build --build-version-suffix ${{ steps.build-version.outputs.sha_short }} + + - name: Upload executable + uses: actions/upload-artifact@v3 + with: + name: hyde + path: builds/hyde