-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from buggregator/ci/releases
ci: auto release support by release-please action
- Loading branch information
Showing
5 changed files
with
217 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// 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 | ||
'tests', // 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 | ||
], | ||
], | ||
}, | ||
} |
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,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: '' | ||
} |
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,77 @@ | ||
{ | ||
"release-type": "php", | ||
"packages": { | ||
".": { | ||
"package-name": "trap", | ||
"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": "tests", | ||
"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 | ||
} | ||
] | ||
} |
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,27 @@ | ||
--- | ||
|
||
# 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: | ||
branches: | ||
- master | ||
|
||
name: 📦 Create release | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🎉 Create release | ||
uses: google-github-actions/release-please-action@v4 | ||
id: release | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
config-file: .github/.release-please-config.json | ||
manifest-file: src/version.json | ||
target-branch: master | ||
|
||
... |
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,3 @@ | ||
{ | ||
".": "1.6.0" | ||
} |