From f765bbbbde7cc88bbb895537ba10ceafaa1475c0 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Tue, 6 Jul 2021 13:44:37 +0900 Subject: [PATCH 1/4] use ubuntu-latest --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b130639..d6f769f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: branches: [master] jobs: main: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - id: yarn_cache From 22d1e6db91a9fe30405a76ef41e3db2d19953d8d Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Tue, 6 Jul 2021 13:50:51 +0900 Subject: [PATCH 2/4] use actions/setup-node --- .github/workflows/publish.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d6f769f..58dee5f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,13 +7,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - id: yarn_cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/setup-node@v2 with: - path: ${{ steps.yarn_cache.outputs.dir }} - key: yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: yarn- + node-version: 14 + cache: yarn + registry-url: https://registry.npmjs.org/ - run: yarn - name: Git configuration. run: | @@ -23,5 +21,6 @@ jobs: run: | npm version patch git push --atomic --tags origin HEAD - echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 5a9dfe5ea56606afa24722c5420dd036376867df Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Tue, 6 Jul 2021 13:51:51 +0900 Subject: [PATCH 3/4] use latest lts node-version --- .github/workflows/build.yml | 3 ++- .github/workflows/publish.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 363ed99..4f865b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,8 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 - with: { node-version: 14 } + with: + node-version: "lts/*" - id: yarn_cache run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v2 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 58dee5f..26075df 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 14 + node-version: "lts/*" cache: yarn registry-url: https://registry.npmjs.org/ - run: yarn From 789013d88125beae412cec826a8e6dc8ab779248 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Tue, 6 Jul 2021 13:52:23 +0900 Subject: [PATCH 4/4] use actions/setup-node cache --- .github/workflows/build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f865b2..e16b495 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,13 +8,7 @@ jobs: - uses: actions/setup-node@v2 with: node-version: "lts/*" - - id: yarn_cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - with: - path: ${{ steps.yarn_cache.outputs.dir }} - key: yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: yarn- + cache: yarn - run: yarn - run: yarn build - name: The working tree is clean.