Support for custom Reporters (#61) #20
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: 'Build and Release PHAR' | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build-phar: | |
| name: Build PHAR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: json, fileinfo | |
| tools: composer | |
| - name: Install dependencies | |
| run: composer install --no-dev --optimize-autoloader | |
| - name: Inject version from tag | |
| run: sed -i "s/public const VERSION = .*/public const VERSION = '${{ github.ref_name }}';/" src/Application.php | |
| - name: Install Box | |
| run: | | |
| mkdir -p tools | |
| curl -Ls https://github.com/box-project/box/releases/download/4.6.6/box.phar -o tools/box | |
| chmod +x tools/box | |
| - name: Build PHAR | |
| run: composer build-phar | |
| - name: Upload PHAR artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: phpcca.phar | |
| path: phpcca.phar | |
| release: | |
| name: Create Release | |
| needs: build-phar | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download PHAR artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: phpcca.phar | |
| - name: Create GitHub Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: phpcca.phar | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| draft: true | |
| generateReleaseNotes: true |