Skip to content

Commit

Permalink
🛠️ build: enable emojis in commit message header and make workflow sc…
Browse files Browse the repository at this point in the history
…ript run on macos-latest
  • Loading branch information
stanleyugwu committed Sep 14, 2024
1 parent 3b28db2 commit d5c5345
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: yarn test --maxWorkers=2 --coverage

build-library:
runs-on: windows-latest
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
45 changes: 45 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import type { UserConfig } from '@commitlint/types';

const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
parserPreset: {
parserOpts: {
headerPattern:
/^(?<type>.*\s\w*)(?:\((?<scope>.*)\))?!?:\s(?<subject>(?:(?!#).)*(?:(?!\s).))$/,
headerCorrespondence: ['type', 'scope', 'subject'],
},
},
rules: {
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
'🛠️ build',
'🛠️🚀 build', // new version release
'♻️ chore',
'⚙️ ci',
'📃 docs',
'✨ feat',
'🐞 fix',
'🚀 perf',
'🦄 refactor',
'🗑️ revert',
'🌈 style',
'🧪 test',
],
],
},
};

module.exports = Configuration;
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devvie/bottom-sheet",
"version": "0.3.0",
"version": "0.4.0",
"description": "The 😎smart , 📦tiny , and 🎗flexible bottom sheet your app craves 🚀",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand All @@ -18,7 +18,9 @@
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"del-build-dir": "node scripts/delete-lib-dir.js",
"build-dts": "tsc --project tsconfig.build.json",
"copy-dts": "xcopy /S /Y \"src\\*.d.ts\" \"lib\\typescript\"",
"copy-dts:unix": "mkdir -p lib/typescript && rsync --prune-empty-dirs -av --include '*/' --include '*.d.ts' --exclude '*' src/ lib/typescript/",
"copy-dts:windows": "xcopy /S /Y \"src\\*.d.ts\" \"lib\\typescript\"",
"copy-dts": "if [ \"$OS\" = \"Windows_NT\" ]; then yarn copy-dts:windows; else yarn copy-dts:unix; fi",
"prepack": "yarn del-build-dir && yarn build-dts && yarn copy-dts && bob build",
"release": "yarn prepack && dotenv release-it --",
"example": "yarn --cwd example",
Expand Down Expand Up @@ -87,14 +89,9 @@
"<rootDir>/lib/"
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"release-it": {
"git": {
"commitMessage": "🧹✨ chore: release ${version}",
"commitMessage": "🛠️🚀 build: release ${version}",
"tagName": "v${version}",
"requireBranch": "main"
},
Expand Down

0 comments on commit d5c5345

Please sign in to comment.