Skip to content

Commit

Permalink
feat(repo): Added semver executors and Commitizen
Browse files Browse the repository at this point in the history
  • Loading branch information
sullivanp-fxl committed Nov 5, 2022
1 parent c986373 commit 0db2111
Show file tree
Hide file tree
Showing 18 changed files with 849 additions and 122 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ name: default

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: configure git
run: |
- uses: actions/checkout@v3
- name: configure git
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: npm ci
- run: npx nx run web-shell:semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm ci

- run: npx nx affected --target=semantic-release --parallel=5 --base=main~1 --head=main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion apps/apis/message/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"lint": {
"executor": "@nx-dotnet/core:format"
},
"server-api-sync": {
"server-api-sync": {
"executor": "@open-system/executors-dotnet:server-api-sync",
"options": {
"domainName": "message",
Expand Down
84 changes: 83 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// commitlint.config.js
/** @type {import('cz-git').UserConfig} */
module.exports = {
"extends": ["@commitlint/config-conventional"],
"rules": {
Expand All @@ -15,7 +17,87 @@ module.exports = {
"type-enum": [
1,
"always",
["chore", "feat", "fix", "docs", "style", "refactor", "test", "revert"],
["chore", "feat", "fix", "docs", "style", "refactor", 'perf', "build", "ci", "test", "revert"],
],
},
prompt: {
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',
footer: 'List any ISSUES by this change. E.g.: #31, #34:\n',
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: '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: 'refactor', name: 'refactor: A code change that neither fixes a bug nor adds a feature', emoji: ':recycle:' },
{ value: 'perf', name: 'perf: A code change that improves performance', emoji: ':zap:' },
{ value: 'test', name: 'test: Adding missing tests or correcting existing tests', emoji: ':white_check_mark:' },
{ value: 'build', name: 'build: Changes that affect the build system or external dependencies', emoji: ':package:' },
{ value: 'ci', name: 'ci: Changes to our CI configuration files and scripts', emoji: ':ferris_wheel:' },
{ value: 'chore', name: 'chore: Other changes that don\'t modify src or test files', emoji: ':hammer:' },
{ value: 'revert', name: 'revert: Reverts a previous commit', emoji: ':rewind:' }
],

scopes: [
{ name: 'design-system', description: 'Anything related to the repository\'s design-system projects (ex: design-system/components, design-system/tokens, storybook, etc.)', emoji: ':art:' },
{ name: 'tools', description: 'Anything related to the helper projects in the tools/ directory', emoji: ':hammer_and_wrench:' },
{ name: 'docs', description: 'Anything related to the docusaurus site', emoji: ':memo:' },

{ name: 'web-shell', description: 'Anything related to the `web-shell` application', emoji: ':shell:' },
{ name: 'web-landing', description: 'Anything related to the `web-landing` application', emoji: ':house:' },
{ name: 'shared', description: 'Anything related to the `shared` applications and libraries', emoji: ':chains:' },
{ name: 'message', description: 'Anything related to the `message` domain', emoji: ':envelope:' },
{ name: 'user-account', description: 'Anything related to the `user-account` domain', emoji: ':lock:' },

{
name: 'repo',
description: 'anything related to managing the repo itself (ex: bundling, maintenance, etc.)',
emoji: ":package:"
},
{
name: 'test',
description: 'anything testing specific (e.g., jest or cypress)',
emoji: ":test_tube:"
},
{ name: 'misc', description: 'misc stuff', emoji: ":open_file_folder:" },
],

allowCustomScopes: false,
allowEmptyScopes: false,
allowBreakingChanges: ['feat', 'fix'],
skipQuestions: ['ticketNumber'],
emojiAlign: 'center',
themeColorCode: '',
upperCaseSubject: false,
markBreakingChangeMode: false,
allowBreakingChanges: ['feat', 'fix'],
subjectLimit: 150,
breaklineNumber: 100,
breaklineChar: '|',
issuePrefixs: [{ value: 'closed', name: 'closed: ISSUES has been processed' }],
customIssuePrefixsAlign: 'top',
emptyIssuePrefixsAlias: 'skip',
customIssuePrefixsAlias: 'custom',
allowCustomIssuePrefixs: true,
allowEmptyIssuePrefixs: true,
confirmColorize: true,
maxHeaderLength: Infinity,
maxSubjectLength: Infinity,
minSubjectLength: 0,
scopeOverrides: undefined,
defaultBody: '',
defaultIssues: '',
defaultScope: '',
defaultSubject: ''
}
};
9 changes: 9 additions & 0 deletions design-system/components/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@
"quiet": true
}
}
},
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"github": true,
"npm": false,
"changelog": true,
"tagFormat": "design-system-components-v${VERSION}"
}
}
}
}
9 changes: 9 additions & 0 deletions design-system/tokens/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@
"outputPath": "apps/docs/src/components/DesignTokens/design-tokens-table.mdx",
"tokensPath": "dist/design-system/tokens/css"
}
},
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"github": true,
"npm": false,
"changelog": true,
"tagFormat": "design-system-tokens-v${VERSION}"
}
}
},
"tags": []
Expand Down
14 changes: 13 additions & 1 deletion design-system/tokens/src/open-system/design-tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@
}
}
},
"quaternary": {
"description": "",
"type": "color",
"value": "#1ea7fdff",
"blendMode": "normal",
"extensions": {
"org.lukasoppermann.figmaDesignTokens": {
"styleId": "S:767bbbe94d8556491a53778f9de1a3c42e1b5deb,",
"exportKey": "color"
}
}
},
"inverse": {
"description": "",
"type": "color",
Expand All @@ -51,7 +63,7 @@
"active": {
"description": "",
"type": "color",
"value": "#516cb0ff",
"value": "#1ea7fdff",
"blendMode": "normal",
"extensions": {
"org.lukasoppermann.figmaDesignTokens": {
Expand Down
Binary file modified design-system/tokens/src/open-system/open-system.fig
Binary file not shown.
9 changes: 9 additions & 0 deletions libs/shared/ui/components/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
"jestConfig": "libs/shared/ui/components/jest.config.ts",
"passWithNoTests": true
}
},
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"github": true,
"npm": false,
"changelog": true,
"tagFormat": "shared-ui-components-v${VERSION}"
}
}
}
}
9 changes: 9 additions & 0 deletions libs/shared/ui/feature-routing/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
"jestConfig": "libs/shared/ui/feature-routing/jest.config.ts",
"passWithNoTests": true
}
},
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"github": true,
"npm": false,
"changelog": true,
"tagFormat": "shared-ui-feature-routing-v${VERSION}"
}
}
}
}
Loading

0 comments on commit 0db2111

Please sign in to comment.