From 768db615edaf3054a79d5e16b161c780509787e3 Mon Sep 17 00:00:00 2001 From: Anduin Xue Date: Tue, 1 Mar 2022 01:04:07 +0800 Subject: [PATCH] Unify jobs as build --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++ .github/workflows/readme-generate.yml | 29 ----------------- .github/workflows/textlint.yml | 35 -------------------- 3 files changed, 46 insertions(+), 64 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/readme-generate.yml delete mode 100644 .github/workflows/textlint.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..178ebb4b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Rebuild project + +on: + push: + branches: + - '*' + - '*/*' + - '**' + pull_request: + branches: + - '*' + - '*/*' + - '**' + workflow_dispatch: + +jobs: + readme-gen: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: node ./.github/readme-generate.js + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "[ci skip] Automatic generate readme" + file_pattern: ":/*.md" + commit_user_name: github-actions[bot] + commit_user_email: github-actions[bot]@users.noreply.github.com + commit_author: github-actions[bot] + lint-fix: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + cache: 'npm' + - run: npm install + - run: ./node_modules/.bin/textlint . --fix + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: '[ci skip] Automatic textlint fixes' + branch: 'master' + file_pattern: ':/*.md' + commit_user_name: github-actions[bot] + commit_user_email: github-actions[bot]@users.noreply.github.com + commit_author: github-actions[bot] diff --git a/.github/workflows/readme-generate.yml b/.github/workflows/readme-generate.yml deleted file mode 100644 index 3786dd1c..000000000 --- a/.github/workflows/readme-generate.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Readme Generate - -on: - push: - branches: - - '*' - - '*/*' - - '**' - pull_request: - branches: - - '*' - - '*/*' - - '**' - workflow_dispatch: - -jobs: - readme-gen: - runs-on: ubuntu-latest - # if: github.repository_owner == 'Anduin2017' - steps: - - uses: actions/checkout@v2 - - run: node ./.github/readme-generate.js - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "[ci skip] Automatic generate readme" - file_pattern: ":/*.md" - commit_user_name: github-actions[bot] - commit_user_email: github-actions[bot]@users.noreply.github.com - commit_author: github-actions[bot] diff --git a/.github/workflows/textlint.yml b/.github/workflows/textlint.yml deleted file mode 100644 index d490709e..000000000 --- a/.github/workflows/textlint.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Textlint - -on: - push: - branches: - - '*' - - '*/*' - - '**' - pull_request: - branches: - - '*' - - '*/*' - - '**' - workflow_dispatch: - -jobs: - lint-fix: - runs-on: ubuntu-latest - if: github.repository_owner == 'Anduin2017' - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '16' - cache: 'npm' - - run: npm install - - run: ./node_modules/.bin/textlint . --fix - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: '[ci skip] Automatic textlint fixes' - branch: 'master' - file_pattern: ':/*.md' - commit_user_name: github-actions[bot] - commit_user_email: github-actions[bot]@users.noreply.github.com - commit_author: github-actions[bot]