Skip to content

Commit

Permalink
Merge branch '2.x' into feature/where-not
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk authored Apr 4, 2024
2 parents f76b187 + 1f5b226 commit f1543f9
Show file tree
Hide file tree
Showing 7 changed files with 287 additions and 74 deletions.
43 changes: 43 additions & 0 deletions .github/.commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// 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', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'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',
'fix',
'perf',
'docs',
'style',
'deps',
'refactor',
'ci',
'test',
'revert',
'build',
'chore',
],
],
},
}
83 changes: 83 additions & 0 deletions .github/.release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "node",
"include-component-in-tag": false,
"packages": {
".": {
"package-name": "database",
"changelog-path": "/CHANGELOG.md"
}
},
"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": "style",
"section": "Styles",
"hidden": false
},
{
"type": "deps",
"section": "Dependencies",
"hidden": false
},
{
"type": "refactor",
"section": "Code Refactoring",
"hidden": false
},
{
"type": "test",
"section": "Tests",
"hidden": false
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": false
},
{
"type": "chore",
"section": "Miscellaneous",
"hidden": true
},
{
"type": "revert",
"section": "Reverts",
"hidden": true
},
{
"type": "build",
"section": "Build System",
"hidden": true
},
{
"type": "security",
"section": "Security",
"hidden": true
},
{
"type": "translation",
"section": "Translations",
"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 @@
{
".": "2.9.0"
}
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---

on: # yamllint disable-line rule:truthy
pull_request:
branches:
- 2.x

name: 🔍 Integration

jobs:
lint-commits:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- name: 📦 Check out the codebase
uses: actions/checkout@v4.1.1

# See: https://github.com/wagoid/commitlint-github-action
- name: 🧐 Lint commits using "commitlint"
uses: wagoid/commitlint-github-action@v6.0.0
with:
configFile: ${{ github.workspace }}/.github/commitlint.config.mjs
failOnWarnings: false
failOnErrors: true
helpURL: 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint'
26 changes: 26 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---

# 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

on: # yamllint disable-line rule:truthy
push:
branches:
- 2.x

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: .github/.release-please-manifest.json
target-branch: 2.x

...
Loading

0 comments on commit f1543f9

Please sign in to comment.