Skip to content

Commit

Permalink
Merge pull request #698 from wayofdev/feat/infra-dx
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed Apr 22, 2024
2 parents ebbb5b5 + 73c516c commit e4059de
Show file tree
Hide file tree
Showing 15 changed files with 661 additions and 302 deletions.
44 changes: 44 additions & 0 deletions .github/.commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// More info: https://github.com/wayofdev/npm-shareable-configs/blob/master/packages/commitlint-config/src/index.js
const automaticCommitPattern = /^chore\(release\):.*\[skip ci]/

export default {
extends: ['@commitlint/config-conventional'],
/*
This resolves a linting conflict between commitlint's body-max-line-length
due to @semantic-release/git putting release notes in the commit body
https://github.com/semantic-release/git/issues/331
*/
ignores: [(commitMessage) => automaticCommitPattern.test(commitMessage)],
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 120],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 120],
'header-max-length': [2, 'always', 100],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'feat', // New feature
'fix', // Bug fix
'perf', // Performance improvement
'docs', // Documentation changes
'style', // Code style update (formatting, missing semi colons, etc)
'deps', // Dependency updates
'refactor', // Code refactoring
'ci', // Continuous integration changes
'test', // Adding missing tests
'revert', // Revert to a previous commit
'build', // Changes that affect the build system
'chore', // Other changes that don't modify src or test files
'security', // Security improvements
],
],
},
}
65 changes: 65 additions & 0 deletions .github/.cz.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// @see https://cz-git.qbb.sh/config/#configure-template
module.exports = {
alias: { fd: 'docs: fix typos' },
messages: {
type: 'Select the type of change that you\'re committing:',
scope: 'Denote the SCOPE of this change (optional):',
customScope: 'Denote the SCOPE of this change:',
subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
breaking: 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',
footerPrefixesSelect: 'Select the ISSUES type of changeList by this change (optional):',
customFooterPrefix: 'Input ISSUES prefix:',
footer: 'List any ISSUES by this change. E.g.: #31, #34:\n',
generatingByAI: 'Generating your AI commit subject...',
generatedSelectByAI: 'Select suitable subject by AI generated:',
confirmCommit: 'Are you sure you want to proceed with the commit above?'
},
types: [
{ value: 'feat', name: 'feat: A new feature', emoji: ':sparkles:' },
{ value: 'fix', name: 'fix: A bug fix', emoji: ':bug:' },
{ value: 'perf', name: 'perf: A code change that improves performance', emoji: ':zap:' },
{ value: 'docs', name: 'docs: Documentation only changes', emoji: ':memo:' },
{ value: 'style', name: 'style: Changes that do not affect the meaning of the code', emoji: ':lipstick:' },
{ value: 'deps', name: 'deps: A dependency update', emoji: ':package:' },
{ value: 'refactor', name: 'refactor: A code change that neither fixes a bug nor adds a feature', emoji: ':recycle:' },
{ value: 'ci', name: 'ci: Changes to our CI configuration files and scripts', emoji: ':ferris_wheel:' },
{ value: 'test', name: 'test: Adding missing tests or correcting existing tests', emoji: ':white_check_mark:' },
{ value: 'revert', name: 'revert: Reverts a previous commit', emoji: ':rewind:' },
{ value: 'build', name: 'build: Changes that affect the build system or external dependencies', emoji: ':package:' },
{ value: 'chore', name: 'chore: Other changes that don\'t modify src or test files', emoji: ':hammer:' },
{ value: 'security', name: 'security: A code change that fixes a security issue', emoji: ':lock:' }
],
useEmoji: false,
emojiAlign: 'center',
useAI: false,
aiNumber: 1,
themeColorCode: '',
scopes: [],
allowCustomScopes: true,
allowEmptyScopes: true,
customScopesAlign: 'bottom',
customScopesAlias: 'custom',
emptyScopesAlias: 'empty',
upperCaseSubject: false,
markBreakingChangeMode: false,
allowBreakingChanges: ['feat', 'fix'],
breaklineNumber: 100,
breaklineChar: '|',
skipQuestions: [],
issuePrefixes: [{ value: 'closed', name: 'closed: ISSUES has been processed' }],
customIssuePrefixAlign: 'top',
emptyIssuePrefixAlias: 'skip',
customIssuePrefixAlias: 'custom',
allowCustomIssuePrefix: true,
allowEmptyIssuePrefix: true,
confirmColorize: true,
maxHeaderLength: Infinity,
maxSubjectLength: Infinity,
minSubjectLength: 0,
scopeOverrides: undefined,
defaultBody: '',
defaultIssues: '',
defaultScope: '',
defaultSubject: ''
}
72 changes: 72 additions & 0 deletions .github/.release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"release-type": "php",
"packages": {
".": {
"package-name": "laravel-cycle-orm-adapter",
"changelog-path": "/CHANGELOG.md"
}
},
"include-component-in-tag": false,
"changelog-sections": [
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
},
{
"type": "perf",
"section": "Performance Improvements",
"hidden": false
},
{
"type": "docs",
"section": "Documentation",
"hidden": false
},
{
"type": "deps",
"section": "Dependencies",
"hidden": false
},
{
"type": "refactor",
"section": "Code Refactoring",
"hidden": false
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "build",
"section": "Build System",
"hidden": true
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
},
{
"type": "chore",
"section": "Miscellaneous",
"hidden": true
},
{
"type": "style",
"section": "Styles",
"hidden": true
},
{
"type": "revert",
"section": "Reverts",
"hidden": true
}
]
}
3 changes: 3 additions & 0 deletions .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "4.11.4"
}
18 changes: 11 additions & 7 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

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

jobs:
release:
uses: wayofdev/gh-actions/.github/workflows/create-release.yml@master
with:
os: ubuntu-latest
branch: master
package-name: laravel-cycle-orm-adapter
secrets:
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: 🎉 Create release
uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
config-file: .github/.release-please-config.json
manifest-file: .github/.release-please-manifest.json
target-branch: master

...
3 changes: 3 additions & 0 deletions .phive/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!.gitignore
!phars.xml
4 changes: 4 additions & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-require-checker" version="^4.10.0" installed="4.10.0" location="./.phive/composer-require-checker" copy="false"/>
</phive>
Loading

0 comments on commit e4059de

Please sign in to comment.