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
| on: | |
| release: | |
| types: | |
| - created | |
| name: Append phpbench.phar to release | |
| jobs: | |
| build: | |
| name: Compile and upload Phar | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set PHP 8.2 | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| - | |
| name: "Composer install" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--no-scripts --no-dev" | |
| - name: Compile phpbench.phar | |
| run: bin/build-phar.sh | |
| env: | |
| GPG_SIGNING: 1 | |
| GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Check existence of compiled .phar | |
| run: test -e build/phpbench.phar && exit 0 || exit 10 | |
| - name: "Upload PHAR to Release" | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: ./build/phpbench.phar | |
| asset_name: phpbench.phar | |
| asset_content_type: application/octet-stream | |
| - name: "Attach signature to Release" | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: ./build/phpbench.phar.asc | |
| asset_name: phpbench.phar.asc | |
| asset_content_type: application/pgp-signature |