-
Notifications
You must be signed in to change notification settings - Fork 28
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 #30 from elmarti/update-cd
Update cd
- Loading branch information
Showing
12 changed files
with
8,288 additions
and
5,447 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,47 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
# dx-scanner: | ||
# runs-on: ubuntu-latest | ||
# container: dxheroes/dx-scanner:latest | ||
# steps: | ||
# - uses: actions/checkout@v1 | ||
# - name: Runs DX Scanner on the code | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
# DXSCANNER_API_TOKEN: ${{ secrets.DXSCANNER_API_TOKEN }} | ||
# run: dx-scanner run --ci | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set vars | ||
id: vars | ||
run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/} | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 'lts/*' | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Build project | ||
run: yarn build | ||
- name: Semantic Release | ||
id: semantic | ||
uses: cycjimmy/semantic-release-action@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Deploy storybook to Github Pages | ||
run: npm run deploy-storybook -- --ci | ||
env: | ||
GH_TOKEN: MyCompany:${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
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,3 +1,5 @@ | ||
.idea | ||
node_modules | ||
build | ||
.cache | ||
yarn-error.log |
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,53 @@ | ||
|
||
|
||
const path = require('path'); | ||
const fs = require('fs'); | ||
// Given a `const` variable `TEMPLATE_DIR` which points to "<semantic-release-gitmoji>/lib/assets/templates" | ||
|
||
// the *.hbs template and partials should be passed as strings of contents | ||
const template = fs.readFileSync(path.join('semantic-release-templates', 'default-template.hbs')) | ||
const commitTemplate = fs.readFileSync(path.join('semantic-release-templates', 'commit-template.hbs')) | ||
|
||
module.exports = { | ||
branches: ["master"], | ||
plugins: [ | ||
[ | ||
'semantic-release-gitmoji', { | ||
releaseRules: { | ||
major: [ ':boom:' ], | ||
minor: [ ':sparkles:', ':sparkle' ], | ||
patch: [ | ||
':bug:', | ||
':ambulance:', | ||
':lock:' | ||
] | ||
}, | ||
releaseNotes: { | ||
template, | ||
partials: { commitTemplate }, | ||
helpers: { | ||
datetime: function () { | ||
const date = new Date(); | ||
return date.toLocaleString('en-US', { | ||
weekday: 'short', | ||
month: 'long', | ||
day: '2-digit', | ||
year: 'numeric' | ||
}); | ||
} | ||
}, | ||
issueResolution: { | ||
template: '{baseUrl}/{owner}/{repo}/issues/{ref}', | ||
baseUrl: 'https://github.com', | ||
source: 'github.com' | ||
} | ||
} | ||
} | ||
], | ||
'@semantic-release/github', | ||
'@semantic-release/npm' | ||
], | ||
tagFormat: '${version}', | ||
|
||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-actions" | ||
|
||
], | ||
"framework": "@storybook/react" | ||
} |
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,9 @@ | ||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -17,32 +17,36 @@ | |
"scripts": { | ||
"storybook": "start-storybook -p 6006 -c .storybook", | ||
"build": "tsc", | ||
"prepublish": "npm run build", | ||
"prepublish": "yarn build", | ||
"deploy-storybook": "storybook-to-ghpages" | ||
}, | ||
"repository": "https://github.com/elmarti/react-joystick-component", | ||
"author": "elmarti [email protected]", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@storybook/addon-actions": "4.1.0-alpha.1", | ||
"@storybook/react": "4.1.0-alpha.1", | ||
"@storybook/storybook-deployer": "^2.3.0", | ||
"@types/jest": "^22.2.2", | ||
"@types/react": "^16.4.13", | ||
"@types/storybook__addon-actions": "^3.4.1", | ||
"@types/storybook__react": "^3.0.9", | ||
"awesome-typescript-loader": "^4.0.1", | ||
"@storybook/addon-actions": "^6.4.9", | ||
"@storybook/addon-essentials": "^6.4.9", | ||
"@storybook/addon-links": "^6.4.9", | ||
"@storybook/react": "^6.4.9", | ||
"@storybook/storybook-deployer": "^2.8.10", | ||
"@types/jest": "^27.4.0", | ||
"@types/react": "17.0.38", | ||
"@types/storybook__addon-actions": "^5.2.1", | ||
"awesome-typescript-loader": "^5.2.1", | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "7", | ||
"babel-loader": "8.2.3", | ||
"cpx": "^1.5.0", | ||
"jest": "^22.4.3", | ||
"jest": "^27.4.7", | ||
"react": "17.0.2", | ||
"react-docgen-typescript-webpack-plugin": "^1.1.0", | ||
"storybook-addon-jsx": "^5.3.0", | ||
"ts-jest": "^22.4.2", | ||
"typescript": "^2.8.1" | ||
"react-dom": "17.0.2", | ||
"semantic-release-gitmoji": "^1.4.2", | ||
"storybook-addon-jsx": "^7.3.14", | ||
"ts-jest": "^27.1.2", | ||
"typescript": "4.5.4" | ||
}, | ||
"dependencies": { | ||
"react": "^16.5.0", | ||
"react-dom": "^16.5.0" | ||
"peerDependencies": { | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2" | ||
} | ||
} |
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,4 @@ | ||
[`{{commit.short}}`](https://github.com/{{owner}}/{{repo}}/commit/{{commit.short}}) {{subject}} - {{message}} {{#if issues}}(Issues:{{#each issues}} [`{{text}}`]({{link}}){{/each}}){{/if}}{{#if wip}}{{#each wip}} | ||
- [`{{commit.short}}`](https://github.com/{{owner}}/{{repo}}/commit/{{commit.short}}) {{subject}}{{/each}} | ||
|
||
{{/if}} |
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,42 @@ | ||
{{#if compareUrl}} | ||
# [v{{nextRelease.version}}]({{compareUrl}}) ({{datetime "UTC:yyyy-mm-dd"}}) | ||
{{else}} | ||
# v{{nextRelease.version}} ({{datetime "UTC:yyyy-mm-dd"}}) | ||
{{/if}} | ||
|
||
{{#with commits}} | ||
{{#if sparkles}} | ||
## ✨ New Features | ||
{{#each sparkles}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if bug}} | ||
## 🐛 Bug Fixes | ||
{{#each bug}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if ambulance}} | ||
## 🚑 Critical Hotfixes | ||
{{#each ambulance}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if lock}} | ||
## 🔒 Security Issues | ||
{{#each lock}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if boom}} | ||
## 💥 Breaking Changes | ||
{{#each boom}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
{{/with}} |
Oops, something went wrong.