Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: CI

on:
pull_request:
push:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Automated release
on:
push:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
php: [ 8.1, 8.2, 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 }}
coverage: none

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction --no-suggest

- name: Execute Code Sniffer
run: vendor/bin/phpcs

- name: Execute PHP Stan
run: vendor/bin/phpstan

- name: Run test suite
run: |
php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &
php -S 127.0.0.1:8010 -t tests/data/rest >/dev/null 2>&1 &
php vendor/bin/codecept run


release:
name: Automated release
needs:
- 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
11 changes: 11 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"branches": ["master"],
"tagFormat": "${version}",
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "conventionalcommits",
"presetConfig": {}
}],
"@semantic-release/github",
"@semantic-release/release-notes-generator"]
}