fix: use latest semantic-release-action #7
This file contains 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: | |
push: | |
branches: | |
- master | |
name: Release | |
jobs: | |
release: | |
name: Semantic Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache Composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/composer-cache | |
key: "${{ runner.os }}-${{ hashFiles('**/composer.lock') }}" | |
- name: Install Composer | |
uses: php-actions/composer@v6 | |
- name: Run PHPUnit | |
run: php -d xdebug.mode=coverage ./vendor/bin/phpunit | |
- name: Make Coverage Badge | |
uses: action-badges/[email protected] | |
with: | |
file-name: coverage.svg | |
badge-branch: gh-pages | |
coverage-file-name: tests/coverage.latest/coverage.xml | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Execute Semantic Release | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |