-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use conventional commits, introduce release please for automat…
…ed release management (#64)
- Loading branch information
1 parent
afb9efc
commit ea9ff1f
Showing
6 changed files
with
117 additions
and
1 deletion.
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,3 @@ | ||
{ | ||
".": "1.0.1" | ||
} |
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,21 @@ | ||
// Source: @commitlint/config-conventional | ||
module.exports = { | ||
rules: { | ||
'body-leading-blank': [1, 'always'], | ||
'body-max-line-length': [2, 'always', 100], | ||
'footer-leading-blank': [1, 'always'], | ||
'footer-max-line-length': [2, 'always', 100], | ||
'header-max-length': [2, 'always', 100], | ||
'scope-empty': [2, 'never'], | ||
'subject-case': [2, 'never', ['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', | ||
['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test'] | ||
] | ||
} | ||
}; |
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,33 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
"changelog-sections": | ||
[ | ||
{ "type": "feat", "section": "Features" }, | ||
{ "type": "fix", "section": "Bug Fixes" }, | ||
{ "type": "perf", "section": "Performance Improvements" }, | ||
{ "type": "revert", "section": "Reverts" }, | ||
{ "type": "docs", "section": "Documentation", "hidden": true }, | ||
{ "type": "style", "section": "Styles", "hidden": true }, | ||
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": true }, | ||
{ "type": "refactor", "section": "Code Refactoring", "hidden": true }, | ||
{ "type": "test", "section": "Tests", "hidden": true }, | ||
{ "type": "build", "section": "Build System", "hidden": true }, | ||
{ "type": "ci", "section": "Continuous Integration", "hidden": true } | ||
], | ||
"plugins": [ | ||
{ | ||
"type": "sentence-case" | ||
} | ||
], | ||
"initial-version": "1.0.1", | ||
"include-v-in-tag": false, | ||
"include-component-in-tag": false, | ||
"draft-pull-request": true, | ||
"release-type": "php", | ||
"pull-request-title-pattern": "chore: release ${version}", | ||
"pull-request-header": "New release", | ||
"pull-request-footer": "☕", | ||
"packages": { | ||
".": {} | ||
} | ||
} |
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,6 +1,7 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"local>Lendable/renovate-config" | ||
"local>Lendable/renovate-config", | ||
":semanticCommits" | ||
] | ||
} |
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,28 @@ | ||
name: Conventional Commits | ||
|
||
on: | ||
# https://github.com/marketplace/actions/semantic-pull-request#event-triggers | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
- synchronize | ||
merge_group: | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: benhodgson87/[email protected] | ||
if: ${{ github.event_name == 'pull_request' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
commitlintRulesPath: ".github/commitlint.config.js" | ||
commitTitleMatch: "false" | ||
ignoreCommits: "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,30 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-22.04 | ||
name: Release Automation | ||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app-id: ${{ secrets.LENDABOT_APP_ID }} | ||
private-key: ${{ secrets.LENDABOT_APP_PRIVATE_KEY }} | ||
|
||
- uses: google-github-actions/release-please-action@v4 | ||
id: release | ||
with: | ||
token: ${{ steps.generate-token.outputs.token }} | ||
config-file: .github/release-please-config.json | ||
manifest-file: .github/.release-please-manifest.json | ||
include-component-in-tag: false |