Merge pull request #128 from TavoNiievez/small-fixes #9
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
name: Automated release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
static_analysis: | |
name: Static Analysis | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP with PECL extension | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.4' | |
- uses: ramsey/composer-install@v3 | |
- name: Initialize cache | |
uses: actions/cache@v4 | |
with: | |
key: phpstan | |
path: .phpstan-cache | |
- name: Run ECS | |
run: php vendor/bin/ecs | |
- name: Build test files | |
run: vendor/bin/codecept build | |
- name: Run PHPStan | |
run: vendor/bin/phpstan | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [8.3, 8.4] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: pdo, sqlite, imagick | |
coverage: none | |
- uses: ramsey/composer-install@v3 | |
- name: Run test suite | |
run: | | |
php vendor/bin/codecept build | |
php vendor/bin/codecept run | |
release: | |
name: Automated release | |
needs: | |
- static_analysis | |
- tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- run: > | |
npx | |
-p "@semantic-release/commit-analyzer" | |
-p "@semantic-release/release-notes-generator" | |
-p conventional-changelog-conventionalcommits | |
-p semantic-release | |
-- semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
packages: write | |
contents: write | |
pull-requests: write |