Skip to content

Commit

Permalink
chore: update release script
Browse files Browse the repository at this point in the history
  • Loading branch information
ahwgs committed May 31, 2022
1 parent 3951583 commit f2591ab
Show file tree
Hide file tree
Showing 22 changed files with 2,134 additions and 2,054 deletions.
60 changes: 30 additions & 30 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
module.exports = {
extends: '@osdoc-dev/eslint-config-preset-react',
env: {
node: true,
jest: true,
},
rules: {
'import/prefer-default-export': 0,
'import/extensions': 0,
'jsx-quotes': 0,
'unicorn/consistent-destructuring': 0,
'import/no-extraneous-dependencies': 0,
'@typescript-eslint/no-var-requires': 0,
'comma-dangle': 0,
'unicorn/filename-case': 0,
'@typescript-eslint/no-unused-vars': 0,
'unicorn/no-null': 0,
'@typescript-eslint/no-use-before-define': 0,
'unicorn/prevent-abbreviations': 0,
'class-methods-use-this': 0,
'brace-style': 0,
'unicorn/no-array-reduce': 0,
'operator-linebreak': 0,
'arrow-parens': 0,
'@typescript-eslint/no-redeclare': 0,
'no-underscore-dangle': 0,
'@typescript-eslint/no-namespace': 0,
'space-before-function-paren': 0,
},
}
module.exports = {
extends: '@osdoc-dev/eslint-config-preset-react',
env: {
node: true,
jest: true,
},
rules: {
'import/prefer-default-export': 0,
'import/extensions': 0,
'jsx-quotes': 0,
'unicorn/consistent-destructuring': 0,
'import/no-extraneous-dependencies': 0,
'@typescript-eslint/no-var-requires': 0,
'comma-dangle': 0,
'unicorn/filename-case': 0,
'@typescript-eslint/no-unused-vars': 0,
'unicorn/no-null': 0,
'@typescript-eslint/no-use-before-define': 0,
'unicorn/prevent-abbreviations': 0,
'class-methods-use-this': 0,
'brace-style': 0,
'unicorn/no-array-reduce': 0,
'operator-linebreak': 0,
'arrow-parens': 0,
'@typescript-eslint/no-redeclare': 0,
'no-underscore-dangle': 0,
'@typescript-eslint/no-namespace': 0,
'space-before-function-paren': 0,
},
}
66 changes: 33 additions & 33 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
name: github pages

on:
push:
branches:
- master # default branch

jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} #使用action安装node环境
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 7.0.0

- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build:website

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.CI_TOKEN }}
publish_dir: ./dist-website
name: github pages

on:
push:
branches:
- master # default branch

jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} #使用action安装node环境
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 7.0.0

- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build:website

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.CI_TOKEN }}
publish_dir: ./dist-website
82 changes: 41 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Node.js Package
# master push
on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.19.2] #指定node版本
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} #使用action安装node环境
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Set Npm Info
run: |
npm config set registry http://registry.npmjs.org
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
git config --global user.email "[email protected]"
git config --global user.name "ahwgs"
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 7.0.0

- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build

- name: Publish
run: npm publish

name: Node.js Package
# master push
on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.19.2] #指定node版本
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} #使用action安装node环境
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Set Npm Info
run: |
npm config set registry http://registry.npmjs.org
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
git config --global user.email "[email protected]"
git config --global user.name "ahwgs"
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 7.0.0

- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build

- name: Publish
run: npm publish

14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
*.log
.DS_Store
node_modules
.cache
dist
yarn.lock
.umi
*.log
.DS_Store
node_modules
.cache
dist
yarn.lock
.umi
.idea
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"start": "cross-env NODE_ENV=development avenger build --watch",
"build": "cross-env NODE_ENV=production avenger build",
"start:website": "dumi dev",
"build:website": "dumi build"
"build:website": "dumi build",
"release": "bumpp package.json --commit --push --tag"
},
"peerDependencies": {
"react": ">=16"
Expand Down Expand Up @@ -60,6 +61,7 @@
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"babel-loader": "^8.2.2",
"bumpp": "^7.1.1",
"commitizen": "^4.2.4",
"conventional-changelog-cli": "^2.1.1",
"cross-env": "^7.0.3",
Expand Down
Loading

0 comments on commit f2591ab

Please sign in to comment.