diff --git a/.github/GitHub_Pages_Deploy.workflow b/.github/GitHub_Pages_Deploy.workflow new file mode 100644 index 00000000..b44af763 --- /dev/null +++ b/.github/GitHub_Pages_Deploy.workflow @@ -0,0 +1,7 @@ +action "Deploy to GitHub Pages" { + uses = "maxheld83/ghpages@v0.2.1" + env = { + BUILD_DIR = "dist/" + } + secrets = ["ACTION_TOKEN"] +} diff --git a/.github/issue-reference.workflow b/.github/issue-reference.workflow new file mode 100644 index 00000000..a15f2291 --- /dev/null +++ b/.github/issue-reference.workflow @@ -0,0 +1,11 @@ +workflow "Add an issue reference to a pull request" { + on = "pull_request" + resolves = "Add an issue reference" +} + +action "Add an issue reference" { + uses = "kentaro-m/add-an-issue-reference-action@master" + secrets = ["ACTION_TOKEN"] + # branch name prefix + args = "{\"branch\":\"issue\"}" +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc6f072f..635fe115 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node_version: [8.x, 10.x, 12.x] + node_version: [10.x, 12.x] os: [ubuntu-latest, windows-latest, macOS-latest] steps: - uses: actions/checkout@v1 @@ -19,10 +19,9 @@ jobs: - run: yarn run lint - run: yarn run tsc - run: yarn run build - - run: yarn run test + - run: yarn run test:all env: CI: true - HEADLESS: false PROGRESS: none NODE_ENV: test NODE_OPTIONS: --max_old_space_size=4096 diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml index 82f83d4d..85dc5606 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/rebase.yml @@ -5,10 +5,19 @@ name: Automatic Rebase jobs: rebase: name: Rebase + if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') runs-on: ubuntu-latest steps: - uses: actions/checkout@master + with: + fetch-depth: 0 - name: Automatic Rebase - uses: cirrus-actions/rebase@master + uses: cirrus-actions/rebase@1.2 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} + always_job: + name: Always run job + runs-on: ubuntu-latest + steps: + - name: Always run + run: echo "This job is used to prevent the workflow to fail when all other jobs are skipped." diff --git a/.prettierignore b/.prettierignore index 4fa82fc9..87715a7d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,4 +17,5 @@ LICENSE .eslintcache *.lock yarn-error.log -.history \ No newline at end of file +.history +CNAME diff --git a/azure-pipelines.yml b/azure-pipelines.yml index de92a14f..983764f2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,7 +16,7 @@ jobs: steps: - checkout: self clean: false - - script: npm install + - script: yarn displayName: install - script: npm run lint displayName: lint @@ -36,7 +36,7 @@ jobs: options: '-u root' steps: - - script: npm install + - script: yarn displayName: install - script: npm run test:all env: @@ -51,7 +51,7 @@ jobs: - task: NodeTool@0 inputs: versionSpec: '11.x' - - script: npm install + - script: yarn displayName: install - script: npm run lint displayName: lint @@ -74,7 +74,7 @@ jobs: - task: NodeTool@0 inputs: versionSpec: '11.x' - - script: npm install + - script: yarn displayName: install - script: npm run lint displayName: lint diff --git a/package.json b/package.json index f4daebdf..968aefd8 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "gh-pages": "cp CNAME ./dist/ && gh-pages -d dist", "i18n-remove": "pro i18n-remove --locale=zh-CN --write", "lint": "npm run lint:js && npm run lint:style && npm run lint:prettier", - "lint:prettier": "prettier --check \"**/*\"", + "lint:prettier": "prettier --check \"**/*\" --end-of-line auto", "lint-staged": "lint-staged", "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ", "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style",