From 660ad34dcb9d8b8b76b77def765a3195b29fa4ae Mon Sep 17 00:00:00 2001 From: Yuta Mizui Date: Tue, 18 Jul 2023 23:31:57 +0900 Subject: [PATCH] Update dependency lib --- .github/workflows/label_export.yml | 7 ++--- .github/workflows/label_sync.yml | 6 ++-- .github/workflows/qiita_publish_articles.yml | 5 +++- .../workflows/{test.yml => qiita_test.yml} | 26 ++++++---------- package.json | 30 +++---------------- qiita/package.json | 28 ++++++++++++++++- 6 files changed, 50 insertions(+), 52 deletions(-) rename .github/workflows/{test.yml => qiita_test.yml} (61%) diff --git a/.github/workflows/label_export.yml b/.github/workflows/label_export.yml index 2b99cef..af82740 100644 --- a/.github/workflows/label_export.yml +++ b/.github/workflows/label_export.yml @@ -1,10 +1,9 @@ name: Export label on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] + push: paths: - - '.github/workflows/label_export.yml' + - ".github/workflows/label_export.yml" label: types: [created, edited, deleted] workflow_dispatch: @@ -34,7 +33,7 @@ jobs: ref: main - uses: actions/setup-node@v3 with: - cache: 'yarn' + cache: "yarn" - run: yarn install - uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/label_sync.yml b/.github/workflows/label_sync.yml index 8291244..0011bc9 100644 --- a/.github/workflows/label_sync.yml +++ b/.github/workflows/label_sync.yml @@ -2,10 +2,9 @@ name: Sync labels on: push: - branches: - - main paths: - - '.github/labels.yaml' + - ".github/labels.yaml" + - ".github/workflows/label_sync.yml" workflow_dispatch: permissions: @@ -23,3 +22,4 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} config-file: .github/labels.yaml delete-other-labels: true + dry-run: ${{ github.ref != 'refs/heads/main' }} diff --git a/.github/workflows/qiita_publish_articles.yml b/.github/workflows/qiita_publish_articles.yml index 96801ce..a52dfda 100644 --- a/.github/workflows/qiita_publish_articles.yml +++ b/.github/workflows/qiita_publish_articles.yml @@ -4,6 +4,9 @@ on: push: branches: - main + paths: + - "qiita/**" + - ".github/workflows/qiita_publish_articles.yml" workflow_dispatch: permissions: @@ -31,7 +34,7 @@ jobs: ref: main - uses: actions/setup-node@v3 with: - cache: 'yarn' + cache: "yarn" - run: yarn install - run: yarn workspace qiita publish:all env: diff --git a/.github/workflows/test.yml b/.github/workflows/qiita_test.yml similarity index 61% rename from .github/workflows/test.yml rename to .github/workflows/qiita_test.yml index 57f18ad..06f3f01 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/qiita_test.yml @@ -1,7 +1,10 @@ -name: Test +name: Qiita - Test on: push: + paths: + - "qiita/**" + - ".github/workflows/qiita_test.yml" permissions: contents: read @@ -24,13 +27,13 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - cache: 'yarn' + cache: "yarn" - run: yarn install - - run: yarn run textlint - - run: yarn run textlint:codecov + - run: yarn workspace qiita textlint:codecov - uses: codecov/codecov-action@v3 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - run: yarn workspace qiita textlint prettier: runs-on: ubuntu-latest @@ -39,17 +42,6 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - cache: 'yarn' + cache: "yarn" - run: yarn install - - run: yarn run prettier - - label_sync: - runs-on: ubuntu-latest - timeout-minutes: 2 - steps: - - uses: actions/checkout@v3 - - uses: EndBug/label-sync@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - config-file: .github/labels.yaml - dry-run: true + - run: yarn workspace qiita prettier diff --git a/package.json b/package.json index e3a9303..6340da2 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,6 @@ "version": "0.1.0", "main": "index.js", "scripts": { - "format:": "run-s prettier textlint", - "format:fix": "run-s prettier:fix textlint:fix", - "prettier": "prettier --check .", - "prettier:fix": "prettier --write .", - "textlint": "textlint --config .textlintrc.json *", - "textlint:fix": "textlint --config .textlintrc.json --fix *", - "textlint:codecov": "textlint --config .textlintrc.json -f codecov -o tmp/codecov.json *", "prepare": "husky install", "lint-staged": "lint-staged" }, @@ -29,31 +22,16 @@ "qiita" ], "devDependencies": { - "@textlint-ja/textlint-rule-no-synonyms": "^1.3.0", - "codecov.io": "^0.1.6", "husky": "^8.0.3", - "lint-staged": "^13.2.3", - "npm-run-all": "^4.1.5", - "prettier": "^3.0.0", - "sudachi-synonyms-dictionary": "^12.0.0", - "textlint": "^13.3.3", - "textlint-filter-rule-comments": "^1.2.2", - "textlint-formatter-codecov": "^1.0.2", - "textlint-rule-aws-service-name": "^1.4.0", - "textlint-rule-no-mixed-zenkaku-and-hankaku-alphabet": "^1.0.1", - "textlint-rule-no-todo": "^2.0.1", - "textlint-rule-period-in-list-item": "^1.0.1" - }, - "prettier": { - "singleQuote": true + "lint-staged": "^13.2.3" }, "lint-staged": { "**/*": [ - "prettier --write --ignore-unknown" + "yarn workspaces run prettier --write --ignore-unknown" ], "*.md": [ - "textlint --config .textlintrc.json --fix", - "textlint --config .textlintrc.json" + "yarn workspaces run textlint --config .textlintrc.json --fix", + "yarn workspaces run textlint --config .textlintrc.json" ] } } diff --git a/qiita/package.json b/qiita/package.json index bac3e53..b7e8642 100644 --- a/qiita/package.json +++ b/qiita/package.json @@ -8,10 +8,36 @@ "preview": "qiita preview", "publish": "qiita publish", "publish:all": "qiita publish --all", + "format": "run-s prettier textlint", + "format:fix": "run-s prettier:fix textlint:fix", + "prettier": "prettier --check .", + "prettier:fix": "prettier --write .", + "textlint": "textlint --config .textlintrc.json *", + "textlint:fix": "textlint --config .textlintrc.json --fix *", + "textlint:codecov": "textlint --config .textlintrc.json -f codecov -o tmp/codecov.json *", "test": "echo \"Error: no test specified\" && exit 1" }, + "keywords": [], + "author": "Yuta Mizui ", + "license": "MIT", "dependencies": { "@qiita/qiita-cli": "^0.4.0" }, - "devDependencies": {} + "devDependencies": { + "@textlint-ja/textlint-rule-no-synonyms": "^1.3.0", + "codecov.io": "^0.1.6", + "npm-run-all": "^4.1.5", + "prettier": "^3.0.0", + "sudachi-synonyms-dictionary": "^12.0.0", + "textlint": "^13.3.3", + "textlint-filter-rule-comments": "^1.2.2", + "textlint-formatter-codecov": "^1.0.2", + "textlint-rule-aws-service-name": "^1.4.0", + "textlint-rule-no-mixed-zenkaku-and-hankaku-alphabet": "^1.0.1", + "textlint-rule-no-todo": "^2.0.1", + "textlint-rule-period-in-list-item": "^1.0.1" + }, + "prettier": { + "singleQuote": true + } }