Skip to content

Commit e4059de

Browse files
authored
Merge pull request #698 from wayofdev/feat/infra-dx
2 parents ebbb5b5 + 73c516c commit e4059de

15 files changed

+661
-302
lines changed

.github/.commitlint.config.mjs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// More info: https://github.com/wayofdev/npm-shareable-configs/blob/master/packages/commitlint-config/src/index.js
2+
const automaticCommitPattern = /^chore\(release\):.*\[skip ci]/
3+
4+
export default {
5+
extends: ['@commitlint/config-conventional'],
6+
/*
7+
This resolves a linting conflict between commitlint's body-max-line-length
8+
due to @semantic-release/git putting release notes in the commit body
9+
https://github.com/semantic-release/git/issues/331
10+
*/
11+
ignores: [(commitMessage) => automaticCommitPattern.test(commitMessage)],
12+
rules: {
13+
'body-leading-blank': [1, 'always'],
14+
'body-max-line-length': [2, 'always', 120],
15+
'footer-leading-blank': [1, 'always'],
16+
'footer-max-line-length': [2, 'always', 120],
17+
'header-max-length': [2, 'always', 100],
18+
'scope-case': [2, 'always', 'lower-case'],
19+
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
20+
'subject-empty': [2, 'never'],
21+
'subject-full-stop': [2, 'never', '.'],
22+
'type-case': [2, 'always', 'lower-case'],
23+
'type-empty': [2, 'never'],
24+
'type-enum': [
25+
2,
26+
'always',
27+
[
28+
'feat', // New feature
29+
'fix', // Bug fix
30+
'perf', // Performance improvement
31+
'docs', // Documentation changes
32+
'style', // Code style update (formatting, missing semi colons, etc)
33+
'deps', // Dependency updates
34+
'refactor', // Code refactoring
35+
'ci', // Continuous integration changes
36+
'test', // Adding missing tests
37+
'revert', // Revert to a previous commit
38+
'build', // Changes that affect the build system
39+
'chore', // Other changes that don't modify src or test files
40+
'security', // Security improvements
41+
],
42+
],
43+
},
44+
}

.github/.cz.config.js

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// @see https://cz-git.qbb.sh/config/#configure-template
2+
module.exports = {
3+
alias: { fd: 'docs: fix typos' },
4+
messages: {
5+
type: 'Select the type of change that you\'re committing:',
6+
scope: 'Denote the SCOPE of this change (optional):',
7+
customScope: 'Denote the SCOPE of this change:',
8+
subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
9+
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
10+
breaking: 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',
11+
footerPrefixesSelect: 'Select the ISSUES type of changeList by this change (optional):',
12+
customFooterPrefix: 'Input ISSUES prefix:',
13+
footer: 'List any ISSUES by this change. E.g.: #31, #34:\n',
14+
generatingByAI: 'Generating your AI commit subject...',
15+
generatedSelectByAI: 'Select suitable subject by AI generated:',
16+
confirmCommit: 'Are you sure you want to proceed with the commit above?'
17+
},
18+
types: [
19+
{ value: 'feat', name: 'feat: A new feature', emoji: ':sparkles:' },
20+
{ value: 'fix', name: 'fix: A bug fix', emoji: ':bug:' },
21+
{ value: 'perf', name: 'perf: A code change that improves performance', emoji: ':zap:' },
22+
{ value: 'docs', name: 'docs: Documentation only changes', emoji: ':memo:' },
23+
{ value: 'style', name: 'style: Changes that do not affect the meaning of the code', emoji: ':lipstick:' },
24+
{ value: 'deps', name: 'deps: A dependency update', emoji: ':package:' },
25+
{ value: 'refactor', name: 'refactor: A code change that neither fixes a bug nor adds a feature', emoji: ':recycle:' },
26+
{ value: 'ci', name: 'ci: Changes to our CI configuration files and scripts', emoji: ':ferris_wheel:' },
27+
{ value: 'test', name: 'test: Adding missing tests or correcting existing tests', emoji: ':white_check_mark:' },
28+
{ value: 'revert', name: 'revert: Reverts a previous commit', emoji: ':rewind:' },
29+
{ value: 'build', name: 'build: Changes that affect the build system or external dependencies', emoji: ':package:' },
30+
{ value: 'chore', name: 'chore: Other changes that don\'t modify src or test files', emoji: ':hammer:' },
31+
{ value: 'security', name: 'security: A code change that fixes a security issue', emoji: ':lock:' }
32+
],
33+
useEmoji: false,
34+
emojiAlign: 'center',
35+
useAI: false,
36+
aiNumber: 1,
37+
themeColorCode: '',
38+
scopes: [],
39+
allowCustomScopes: true,
40+
allowEmptyScopes: true,
41+
customScopesAlign: 'bottom',
42+
customScopesAlias: 'custom',
43+
emptyScopesAlias: 'empty',
44+
upperCaseSubject: false,
45+
markBreakingChangeMode: false,
46+
allowBreakingChanges: ['feat', 'fix'],
47+
breaklineNumber: 100,
48+
breaklineChar: '|',
49+
skipQuestions: [],
50+
issuePrefixes: [{ value: 'closed', name: 'closed: ISSUES has been processed' }],
51+
customIssuePrefixAlign: 'top',
52+
emptyIssuePrefixAlias: 'skip',
53+
customIssuePrefixAlias: 'custom',
54+
allowCustomIssuePrefix: true,
55+
allowEmptyIssuePrefix: true,
56+
confirmColorize: true,
57+
maxHeaderLength: Infinity,
58+
maxSubjectLength: Infinity,
59+
minSubjectLength: 0,
60+
scopeOverrides: undefined,
61+
defaultBody: '',
62+
defaultIssues: '',
63+
defaultScope: '',
64+
defaultSubject: ''
65+
}

.github/.release-please-config.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"release-type": "php",
3+
"packages": {
4+
".": {
5+
"package-name": "laravel-cycle-orm-adapter",
6+
"changelog-path": "/CHANGELOG.md"
7+
}
8+
},
9+
"include-component-in-tag": false,
10+
"changelog-sections": [
11+
{
12+
"type": "feat",
13+
"section": "Features",
14+
"hidden": false
15+
},
16+
{
17+
"type": "fix",
18+
"section": "Bug Fixes",
19+
"hidden": false
20+
},
21+
{
22+
"type": "perf",
23+
"section": "Performance Improvements",
24+
"hidden": false
25+
},
26+
{
27+
"type": "docs",
28+
"section": "Documentation",
29+
"hidden": false
30+
},
31+
{
32+
"type": "deps",
33+
"section": "Dependencies",
34+
"hidden": false
35+
},
36+
{
37+
"type": "refactor",
38+
"section": "Code Refactoring",
39+
"hidden": false
40+
},
41+
{
42+
"type": "test",
43+
"section": "Tests",
44+
"hidden": true
45+
},
46+
{
47+
"type": "build",
48+
"section": "Build System",
49+
"hidden": true
50+
},
51+
{
52+
"type": "ci",
53+
"section": "Continuous Integration",
54+
"hidden": true
55+
},
56+
{
57+
"type": "chore",
58+
"section": "Miscellaneous",
59+
"hidden": true
60+
},
61+
{
62+
"type": "style",
63+
"section": "Styles",
64+
"hidden": true
65+
},
66+
{
67+
"type": "revert",
68+
"section": "Reverts",
69+
"hidden": true
70+
}
71+
]
72+
}

.github/.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "4.11.4"
3+
}

.github/workflows/create-release.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# https://github.com/wayofdev/gh-actions/blob/master/.github/workflows/create-release.yml
44
# https://github.com/google-github-actions/release-please-action#release-types-supported
5+
# https://github.com/googleapis/release-please/blob/main/docs/customizing.md
56

67
on: # yamllint disable-line rule:truthy
78
push:
@@ -12,12 +13,15 @@ name: 📦 Create release
1213

1314
jobs:
1415
release:
15-
uses: wayofdev/gh-actions/.github/workflows/create-release.yml@master
16-
with:
17-
os: ubuntu-latest
18-
branch: master
19-
package-name: laravel-cycle-orm-adapter
20-
secrets:
21-
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: 🎉 Create release
19+
uses: google-github-actions/release-please-action@v4
20+
id: release
21+
with:
22+
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
23+
config-file: .github/.release-please-config.json
24+
manifest-file: .github/.release-please-manifest.json
25+
target-branch: master
2226

2327
...

.phive/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!.gitignore
3+
!phars.xml

.phive/phars.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phive xmlns="https://phar.io/phive">
3+
<phar name="composer-require-checker" version="^4.10.0" installed="4.10.0" location="./.phive/composer-require-checker" copy="false"/>
4+
</phive>

0 commit comments

Comments
 (0)