-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
265 additions
and
396 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# See https://github.com/release-drafter/release-drafter#configuration | ||
template: | | ||
## What’s Changed | ||
$CHANGES | ||
categories: | ||
- title: "Major features" | ||
labels: | ||
- "MAJOR" | ||
- title: "Breaking changes" | ||
labels: | ||
- "BC-break" | ||
- title: "Other changes" | ||
template: $CHANGES |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Build changelog | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Run Release Drafter | ||
uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'release/*' | ||
|
||
jobs: | ||
autocommit: | ||
name: Build Release | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/mvorisek/image-php:latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Install PHP dependencies | ||
run: composer update --ansi --prefer-dist --no-interaction --no-progress --optimize-autoloader | ||
|
||
- name: Update composer.json | ||
run: >- | ||
composer config --unset version && php -r ' | ||
$f = __DIR__ . "/composer.json"; | ||
$data = json_decode(file_get_contents($f), true); | ||
foreach ($data as $k => $v) { | ||
if (preg_match("~^(.+)-release$~", $k, $matches)) { | ||
$data[$matches[1]] = $data[$k]; unset($data[$k]); | ||
} | ||
} | ||
$str = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n"; | ||
echo $str; | ||
file_put_contents($f, $str); | ||
' | ||
- name: Commit | ||
run: | | ||
git config --global user.name "$(git show -s --format='%an')" | ||
git config --global user.email "$(git show -s --format='%ae')" | ||
git add . -N && (git diff --exit-code || git commit -a -m "Branch for stable release") | ||
- name: Push | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: ${{ github.ref }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Unit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
schedule: | ||
- cron: '0 0/2 * * *' | ||
|
||
jobs: | ||
smoke-test: | ||
name: Smoke | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/mvorisek/image-php:${{ matrix.php }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['latest'] | ||
type: ['CodingStyle', 'StaticAnalysis'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Configure PHP | ||
run: | | ||
rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
php --version | ||
- name: Setup cache 1/2 | ||
id: composer-cache | ||
run: | | ||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
- name: Setup cache 2/2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-smoke-${{ matrix.php }}-${{ matrix.type }}-${{ hashFiles('composer.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install PHP dependencies | ||
run: | | ||
if [ "${{ matrix.type }}" != "CodingStyle" ]; then composer remove --no-interaction --no-update friendsofphp/php-cs-fixer --dev; fi | ||
if [ "${{ matrix.type }}" != "StaticAnalysis" ]; then composer remove --no-interaction --no-update phpstan/\* --dev; fi | ||
composer update --ansi --prefer-dist --no-interaction --no-progress --optimize-autoloader | ||
- name: Check Coding Style (only for CodingStyle) | ||
if: matrix.type == 'CodingStyle' | ||
run: | | ||
vendor/bin/php-cs-fixer fix --dry-run --using-cache=no --diff --verbose | ||
composer config --unset version && composer config --unset require-release | ||
composer validate --strict --no-check-lock && composer normalize --dry-run --no-check-lock | ||
- name: Run Static Analysis (only for StaticAnalysis) | ||
if: matrix.type == 'StaticAnalysis' | ||
run: | | ||
echo "memory_limit = 2G" > /usr/local/etc/php/conf.d/custom-memory-limit.ini | ||
vendor/bin/phpstan analyse |
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.