Version 5.0.6 #51
Workflow file for this run
This file contains hidden or 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
| name: Building Phar Executable on release | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: ['8.5'] | |
| name: PHP ${{ matrix.php-version }} - Create release-artifacts | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: mbstring, json, dom, pdo, pdo_sqlite | |
| - name: Check PHP Version | |
| run: php -v | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate | |
| - name: Cache Composer packages | |
| id: composer-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php-${{ matrix.php-version }}- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-dev | |
| - name: Install Phar Composer | |
| run: curl -JL -o /tmp/phar-composer.phar https://clue.engineering/phar-composer-latest.phar | |
| - name: Cleanup repository | |
| continue-on-error: true | |
| run: rm -R .git .github Benchmarks Dev Documentation Examples Tests *.psd *.png *.txt *.dist .travis.yml .gitignore *.cache *.md | |
| - name: Build Phar | |
| run: php /tmp/phar-composer.phar build . | |
| - name: Upload the artifacts | |
| uses: skx/github-action-publish-binaries@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| args: '*.phar' |