From 11daf899e75c61e87fb5957a070bee600fab0012 Mon Sep 17 00:00:00 2001 From: technote-space Date: Thu, 5 Mar 2020 11:32:38 +0000 Subject: [PATCH 1/2] chore: sync workflows --- .github/workflows/add-version-tag.yml | 1 - .github/workflows/ci.yml | 5 ----- .github/workflows/issue-opened.yml | 9 ++------- .github/workflows/pr-opened.yml | 13 +++---------- .github/workflows/pr-updated.yml | 11 +++-------- .github/workflows/project-card-moved.yml | 5 +---- .github/workflows/toc.yml | 3 +-- .github/workflows/update-dependencies.yml | 1 - 8 files changed, 10 insertions(+), 38 deletions(-) diff --git a/.github/workflows/add-version-tag.yml b/.github/workflows/add-version-tag.yml index 3e2565f..a3c270c 100644 --- a/.github/workflows/add-version-tag.yml +++ b/.github/workflows/add-version-tag.yml @@ -15,7 +15,6 @@ jobs: - name: Get version uses: technote-space/get-next-version-action@v1 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} EXCLUDE_MESSAGES: | update package version update packages diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91a7937..5d27370 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ jobs: - uses: technote-space/get-git-comment-action@v1 - uses: technote-space/get-diff-action@v1 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PREFIX_FILTER: | src/ __tests__/ @@ -64,7 +63,6 @@ jobs: - uses: technote-space/get-git-comment-action@v1 - uses: technote-space/get-diff-action@v1 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PREFIX_FILTER: | src/ __tests__/ @@ -172,7 +170,6 @@ jobs: - name: Check package version uses: technote-space/package-version-check-action@v1 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMMIT_DISABLED: 1 if: env.RUNNING - name: Install Package dependencies @@ -228,8 +225,6 @@ jobs: if: always() steps: - uses: technote-space/workflow-conclusion-action@v1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: 8398a7/action-slack@v2 with: status: failure diff --git a/.github/workflows/issue-opened.yml b/.github/workflows/issue-opened.yml index d00c958..1972013 100644 --- a/.github/workflows/issue-opened.yml +++ b/.github/workflows/issue-opened.yml @@ -9,18 +9,13 @@ jobs: name: Assign issues to project runs-on: ubuntu-latest steps: - - name: Assign issues to project - uses: technote-space/create-project-card-action@v1 + - uses: technote-space/create-project-card-action@v1 with: PROJECT: Backlog COLUMN: To do - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} assignAuthor: name: Assign author to issue runs-on: ubuntu-latest steps: - - name: Assign author to issue - uses: technote-space/assign-author@v1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: technote-space/assign-author@v1 diff --git a/.github/workflows/pr-opened.yml b/.github/workflows/pr-opened.yml index 68210ca..9c6ad6d 100644 --- a/.github/workflows/pr-opened.yml +++ b/.github/workflows/pr-opened.yml @@ -10,8 +10,7 @@ jobs: name: Assign PullRequest to Project runs-on: ubuntu-latest steps: - - name: Assign PullRequest to Project - uses: technote-space/create-project-card-action@v1 + - uses: technote-space/create-project-card-action@v1 with: PROJECT: Backlog COLUMN: In progress @@ -21,16 +20,10 @@ jobs: name: Assign author to PR runs-on: ubuntu-latest steps: - - name: Assign Author to PR - uses: technote-space/assign-author@v1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: technote-space/assign-author@v1 addLabelsByBranch: name: PR Labeler runs-on: ubuntu-latest steps: - - name: PR Labeler - uses: technote-space/pr-labeler-action@v3 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: technote-space/pr-labeler-action@v3 diff --git a/.github/workflows/pr-updated.yml b/.github/workflows/pr-updated.yml index b7eb97d..6650ed2 100644 --- a/.github/workflows/pr-updated.yml +++ b/.github/workflows/pr-updated.yml @@ -10,8 +10,7 @@ jobs: runs-on: ubuntu-latest if: "! startsWith(github.head_ref, 'release/')" steps: - - name: Pull Request Labeler - uses: actions/labeler@v2 + - uses: actions/labeler@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} @@ -20,10 +19,8 @@ jobs: runs-on: ubuntu-latest if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id steps: - - name: Pull Request Body - uses: technote-space/pr-commit-body-action@v1 + - uses: technote-space/pr-commit-body-action@v1 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} EXCLUDE_MESSAGES: | trigger workflow update TOC @@ -38,8 +35,7 @@ jobs: runs-on: ubuntu-latest if: "github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/') && ! startsWith(github.head_ref, 'release/v')" steps: - - name: Manage release - uses: technote-space/release-type-action@v1 + - uses: technote-space/release-type-action@v1 with: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} EXCLUDE_MESSAGES: | @@ -63,7 +59,6 @@ jobs: - name: Get version uses: technote-space/get-next-version-action@v1 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} EXCLUDE_MESSAGES: | update package version update packages diff --git a/.github/workflows/project-card-moved.yml b/.github/workflows/project-card-moved.yml index 699a2f6..e0aad2d 100644 --- a/.github/workflows/project-card-moved.yml +++ b/.github/workflows/project-card-moved.yml @@ -9,7 +9,4 @@ jobs: name: Auto card labeler runs-on: ubuntu-latest steps: - - name: Auto card labeler - uses: technote-space/auto-card-labeler@v1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: technote-space/auto-card-labeler@v1 diff --git a/.github/workflows/toc.yml b/.github/workflows/toc.yml index e9fbb0d..b343c8c 100644 --- a/.github/workflows/toc.yml +++ b/.github/workflows/toc.yml @@ -10,8 +10,7 @@ jobs: name: TOC Generator runs-on: ubuntu-latest steps: - - name: TOC Generator - uses: technote-space/toc-generator@v2 + - uses: technote-space/toc-generator@v2 with: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} TARGET_BRANCH_PREFIX: release/ diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index c915ebb..ea2aefe 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -46,7 +46,6 @@ jobs: - name: Get version uses: technote-space/get-next-version-action@v1 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} EXCLUDE_MESSAGES: | update package version update packages From 04426fd088b792581baee78bf94b82ef11f685cb Mon Sep 17 00:00:00 2001 From: technote-space Date: Fri, 6 Mar 2020 06:53:05 +0000 Subject: [PATCH 2/2] chore: sync workflows --- .github/workflows/ci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d27370..c9ff756 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,9 +140,22 @@ jobs: fi env: NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - uses: actions/checkout@v2 if: env.RUNNING + - name: Set running flag + run: npx can-npm-publish || echo "::set-env name=RUNNING::" + if: env.RUNNING && matrix.target == 'npm' + - name: Set running flag + run: | + LATEST=`npm view . version` + CURRENT=`cat package.json | jq -r .version` + if [ "$LATEST" = "$CURRENT" ]; then + echo "::set-env name=RUNNING::" + fi + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: env.RUNNING && matrix.target == 'gpr' + - name: Setup Node.js uses: actions/setup-node@v1 with: