Skip to content

Commit d8294f0

Browse files
Initial commit
0 parents  commit d8294f0

25 files changed

Lines changed: 848 additions & 0 deletions

.cache/.gitkeep

Whitespace-only changes.

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/test export-ignore
2+
/tools export-ignore
3+
/.idea export-ignore
4+
/.gitattributes export-ignore
5+
/.gitignore export-ignore
6+
/.cache export-ignore
7+
/.logs export-ignore
8+
/.php_cs.dist export-ignore
9+
/.travis.yml export-ignore
10+
/infection.json.dist export-ignore
11+
/phive.xml export-ignore
12+
/phpcomp.xml export-ignore
13+
/psalm.xml export-ignore

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "composer"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
12+
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "daily"
17+
18+

.github/release-drafter.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
template: |
2+
## What’s Changed
3+
$CHANGES
4+
exclude-labels:
5+
- "skip-changelog"
6+
- "invalid"

.github/version-drafter.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
major-labels: [ 'semver:major', 'Breaking Change' ]
2+
minor-labels: [ 'semver:minor','enhancement', 'Deprecation' ]
3+
patch-labels: [ 'semver:patch','bug' ]

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release
8+
paths-ignore:
9+
- '**.md'
10+
pull_request:
11+
branches:
12+
- main
13+
- release
14+
paths-ignore:
15+
- '**.md'
16+
17+
jobs:
18+
test_latest:
19+
strategy:
20+
matrix:
21+
php-versions: [ '8.0' ]
22+
prefer: [ 'prefer-lowest', 'prefer-stable' ]
23+
name: Test with ${{ matrix.prefer }} dependency versions on PHP ${{ matrix.php-versions }}
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php-versions }}
34+
coverage: xdebug
35+
36+
- name: Validate composer.json
37+
run: composer validate
38+
39+
- name: Get Composer Cache Directory
40+
id: composer-cache
41+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
42+
- name: Setup cache
43+
uses: actions/cache@v2
44+
with:
45+
path: ${{ steps.composer-cache.outputs.dir }}
46+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.prefer }}-
47+
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
48+
49+
- name: Install dependencies
50+
if: steps.composer-cache.outputs.cache-hit != 'true'
51+
run: composer update --prefer-dist --no-ansi --no-interaction --no-progress --${{ matrix.prefer }}
52+
53+
- name: Run CI tools
54+
run: composer ci-all

.github/workflows/post-release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Post Release
2+
on:
3+
release:
4+
types: [ published ]
5+
6+
jobs:
7+
update_default_branch:
8+
name: Update default branch after published release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
with:
14+
ref: "main"
15+
16+
- name: create changelog
17+
uses: charmixer/auto-changelog-action@v1
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
exclude_labels: "duplicate,question,invalid,wontfix,skip-changelog"
21+
22+
- name: commit updated changelog
23+
uses: EndBug/add-and-commit@v7
24+
with:
25+
message: "[CHANGELOG] Updated changelog"
26+
add: "CHANGELOG.md"
27+
signoff: true
28+
branch: main
29+
30+
- name: Create pull request
31+
uses: repo-sync/pull-request@v2
32+
with:
33+
source_branch: "release"
34+
destination_branch: "main"
35+
pr_title: "[Deployment] Update default branch"
36+
pr_label: "skip-changelog"
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Prepare Release
2+
on:
3+
push:
4+
branches: [ release ]
5+
paths-ignore:
6+
- '**.md'
7+
8+
jobs:
9+
calculate_next_version:
10+
name: Calculate next release version
11+
runs-on: ubuntu-latest
12+
outputs:
13+
version: ${{ steps.version.outputs.next-version }}
14+
steps:
15+
- name: calculate next version
16+
id: version
17+
uses: patrickjahns/version-drafter-action@v1
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
21+
draft_release:
22+
name: Create draft release
23+
runs-on: ubuntu-latest
24+
needs: calculate_next_version
25+
steps:
26+
- name: draft release
27+
uses: release-drafter/release-drafter@v5
28+
with:
29+
version: ${{ format('{0}', needs.calculate_next_version.outputs.version) }}
30+
tag: ${{ format('{0}', needs.calculate_next_version.outputs.version) }}
31+
name: ${{ format('{0}', needs.calculate_next_version.outputs.version) }}
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
35+
update_changelog:
36+
name: Update changelog
37+
runs-on: ubuntu-latest
38+
needs: calculate_next_version
39+
steps:
40+
- name: checkout
41+
uses: actions/checkout@v2
42+
43+
- name: create changelog
44+
uses: charmixer/auto-changelog-action@v1.1
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
exclude_labels: "duplicate,question,invalid,wontfix,skip-changelog"
48+
future_release: ${{ format('{0}', needs.calculate_next_version.outputs.version) }}
49+
release_branch: 'release'
50+
51+
- name: commit updated changelog
52+
uses: EndBug/add-and-commit@v7
53+
with:
54+
message: "[CHANGELOG] Updated changelog"
55+
add: "CHANGELOG.md"
56+
signoff: true
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Update Changelog
2+
on:
3+
push:
4+
branches: [ main ]
5+
paths-ignore:
6+
- "**.md"
7+
8+
jobs:
9+
update_changelog:
10+
name: Update changelog
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: create changelog
17+
uses: charmixer/auto-changelog-action@v1
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
exclude_labels: "duplicate,question,invalid,wontfix,skip-changelog"
21+
22+
- name: commit updated changelog
23+
uses: EndBug/add-and-commit@v7
24+
with:
25+
message: "[CHANGELOG] Updated changelog"
26+
add: "CHANGELOG.md"
27+
signoff: true

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/.cache/*
2+
/.logs/*
3+
/test/.phpunit.result.cache
4+
!/**/.gitkeep
5+
composer.phar
6+
/vendor/
7+
composer.lock
8+
/.idea

0 commit comments

Comments
 (0)