Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflow-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,18 @@
"TOC_FOLDING": "1",
"TOC_MAX_HEADER_LEVEL": "3",
"TOC_TITLE": "Details",
"BRANCH_PREFIX": "release/"
}
"TOC_CREATE_PR": "true",
"TOC_TARGET_PATHS": "README*.md",
"BRANCH_PREFIX": "release/",
"ANNOTATION_EXCLUDE_PATTERNS": [
">> warning ",
">> hint: ",
"Cloning into",
"has unmet peer dependency",
"has incorrect peer dependency",
"Using version",
"ci-helper",
"tests/bootstrap.php"
],
"CHANGE_TEMPLATE": "- [ ] ${TITLE} (#${NUMBER}) @${AUTHOR}"
}
10 changes: 7 additions & 3 deletions .github/workflows/add-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- develop/v*
types: [closed]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

name: Add release tag

jobs:
Expand All @@ -17,7 +20,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- name: Get version
uses: technote-space/get-next-version-action@v1
with:
Expand All @@ -28,7 +32,7 @@ jobs:
env:
HEAD_REF: ${{ github.head_ref }}
if: startsWith(github.head_ref, 'release/v')
- uses: actions/github-script@0.4.0
- uses: actions/github-script@v3
with:
github-token: ${{ secrets.ACCESS_TOKEN }}
script: |
Expand All @@ -39,7 +43,7 @@ jobs:
sha: context.sha
})
if: env.NEXT_VERSION
- uses: actions/github-script@0.4.0
- uses: actions/github-script@v3
with:
github-token: ${{ secrets.ACCESS_TOKEN }}
script: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/broken-link-check.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
on:
schedule:
- cron: 27 3 4 * *
- cron: 18 18 19 * *
repository_dispatch:
types: [check-link]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

name: Broken Link Check
jobs:
check:
name: Broken Link Check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: technote-space/auto-cancel-redundant-workflow@v1
with:
EXCLUDE_MERGED: 'true'
- name: Broken Link Check
uses: technote-space/broken-link-checker-action@v2
46 changes: 46 additions & 0 deletions .github/workflows/check-warnings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
workflow_run:
workflows:
- CI
- Sync workflows
- Update dependencies
- Broken Link Check
types:
- completed

name: Check Warnings

jobs:
annotations:
name: Annotations
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/download-annotations-action@v2
id: annotations
with:
TARGET_RUN_ID: ${{ github.event.workflow_run.id }}
INCLUDE_LEVELS: warning
EXCLUDE_MESSAGE_PATTERNS: ${{ env.ANNOTATION_EXCLUDE_PATTERNS }}
- name: Build attachments
run: |
arr1='[{"fields":[{"title":"repo","value":"<https://github.com/${{ github.repository }}|${{ github.repository }}>","short":true},{"title":"action","value":"<${{ github.event.workflow_run.html_url }}|summary>","short":true}]}]'
arr2=$(echo '${{ steps.annotations.outputs.messages }}' | jq -c 'map({"color":"warning","text":"```\(.)```"})')
echo "SLACK_ATTACHMENTS=$(jq --argjson arr1 "$arr1" --argjson arr2 "$arr2" -nc '$arr1 + $arr2')" >> $GITHUB_ENV
if: steps.annotations.outputs.number > 0
- uses: 8398a7/action-slack@v3
with:
status: custom
fields: repo
custom_payload: |
{
text: "Warning annotations",
attachments: ${{ env.SLACK_ATTACHMENTS }}
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: steps.annotations.outputs.number > 0 && env.SLACK_WEBHOOK_URL
81 changes: 26 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
on: push

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

name: CI

jobs:
Expand All @@ -10,14 +13,11 @@ jobs:
env:
LINT: 1
steps:
- uses: technote-space/auto-cancel-redundant-workflow@v1
with:
EXCLUDE_MERGED: 'true'
- name: Set running flag
run: echo "RUNNING=1" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: technote-space/get-git-comment-action@v1
- uses: technote-space/get-diff-action@v4
- uses: technote-space/get-diff-action@v5
with:
PATTERNS: +(src|__tests__)/**/*.+(js|ts)
FILES: |
Expand All @@ -28,17 +28,10 @@ jobs:
run: echo "RUNNING=" >> $GITHUB_ENV
if: "! env.GIT_DIFF"

- name: Get Yarn Cache Directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
if: env.RUNNING
- name: Cache node dependencies
uses: actions/cache@v2
- uses: actions/setup-node@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 14
cache: yarn
if: env.RUNNING
- name: Install Package dependencies
run: yarn install
Expand All @@ -57,13 +50,13 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
node: ['12', '14']
node: ['12', '14', '16']
steps:
- name: Set running flag
run: echo "RUNNING=1" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: technote-space/get-git-comment-action@v1
- uses: technote-space/get-diff-action@v4
- uses: technote-space/get-diff-action@v5
with:
PATTERNS: +(src|__tests__)/**/*.+(js|ts|snap)
FILES: |
Expand All @@ -74,33 +67,21 @@ jobs:
run: echo "RUNNING=" >> $GITHUB_ENV
if: "! env.GIT_DIFF"
- name: Set running flag
if: "matrix.node == '12' && ! startsWith(github.ref, 'refs/tags/') && github.event.base_ref == format('refs/heads/{0}', github.event.repository.default_branch)"
if: "matrix.node == '14' && ! startsWith(github.ref, 'refs/tags/') && github.event.base_ref == format('refs/heads/{0}', github.event.repository.default_branch)"
run: echo "RUNNING=1" >> $GITHUB_ENV
- name: Set running flag
if: matrix.node == '12' && startsWith(github.ref, 'refs/tags/v')
if: matrix.node == '14' && startsWith(github.ref, 'refs/tags/v')
run: echo "RUNNING=1" >> $GITHUB_ENV
- name: Set running flag
run: |
if [[ ! -f package.json ]] || ! < package.json jq -r '.scripts | keys[]' | grep -qe '^cover$'; then
echo "RUNNING=" >> $GITHUB_ENV
fi

- name: Setup node
uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
if: env.RUNNING
- name: Get Yarn Cache Directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
if: env.RUNNING
- name: Cache node dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: yarn
if: env.RUNNING
- name: Install Package dependencies
run: yarn install
Expand All @@ -116,7 +97,7 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
COVERAGE_FILE: ./coverage/lcov.info
if: env.RUNNING && matrix.node == '12'
if: env.RUNNING && matrix.node == '14'

package:
name: Publish Package
Expand All @@ -139,6 +120,11 @@ jobs:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- uses: actions/checkout@v2
if: env.RUNNING
- name: Check package version
uses: technote-space/package-version-check-action@v1
with:
COMMIT_DISABLED: 1
if: env.RUNNING
- name: Set running flag
run: npx can-npm-publish || echo "RUNNING=" >> $GITHUB_ENV
if: env.RUNNING && matrix.target == 'npm'
Expand All @@ -154,34 +140,19 @@ jobs:
if: env.RUNNING && matrix.target == 'gpr'

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 14
registry-url: https://registry.npmjs.org/
cache: yarn
if: env.RUNNING && matrix.target == 'npm'
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 14
registry-url: https://npm.pkg.github.com
cache: yarn
if: env.RUNNING && matrix.target == 'gpr'
- name: Get Yarn Cache Directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
if: env.RUNNING
- name: Cache node dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
if: env.RUNNING
- name: Check package version
uses: technote-space/package-version-check-action@v1
with:
COMMIT_DISABLED: 1
if: env.RUNNING
- name: Install Package dependencies
run: yarn install
if: env.RUNNING
Expand Down Expand Up @@ -235,7 +206,7 @@ jobs:
timeout-minutes: 3
if: always()
steps:
- uses: technote-space/workflow-conclusion-action@v1
- uses: technote-space/workflow-conclusion-action@v2
- uses: 8398a7/action-slack@v3
with:
status: failure
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/issue-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/create-project-card-action@v1
with:
PROJECT: ${{ env.PROJECT }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/create-project-card-action@v1
with:
PROJECT: ${{ env.PROJECT }}
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/pr-updated.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
on: pull_request_target

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

name: Pull Request updated

jobs:
Expand All @@ -21,13 +24,15 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/pr-commit-body-action@v1
with:
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
TITLE: ${{ env.PR_BODY_TITLE }}
LINK_ISSUE_KEYWORD: ${{ (startsWith(github.head_ref, 'release/') && 'closes') || '' }}
FILTER_PR: true
CHANGE_TEMPLATE: ${{ env.CHANGE_TEMPLATE }}

manageRelease:
name: Manage release
Expand All @@ -37,7 +42,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/release-type-action@v1
with:
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
Expand All @@ -51,7 +57,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- name: Set running flag
run: echo "RUNNING=1" >> $GITHUB_ENV
- uses: actions/checkout@v2
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ on:
pull_request:
types: [opened, synchronize, reopened, closed]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

name: TOC Generator

jobs:
Expand All @@ -13,11 +16,15 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
- uses: technote-space/toc-generator@v2
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/toc-generator@v4
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
TARGET_BRANCH_PREFIX: ${{ env.BRANCH_PREFIX }}
FOLDING: ${{ env.TOC_FOLDING }}
MAX_HEADER_LEVEL: ${{ env.TOC_MAX_HEADER_LEVEL }}
TOC_TITLE: ${{ env.TOC_TITLE }}
CREATE_PR: ${{ env.TOC_CREATE_PR }}
TARGET_PATHS: ${{ env.TOC_TARGET_PATHS }}
FOOTER: ${{ env.TOC_FOOTER }}
Loading