mirror of
https://github.com/chirimen-oh/node-web-i2c.git
synced 2025-01-18 16:08:06 +00:00
Merge pull request #37 from chirimen-oh/use-setup-node-cache
GitHub Actionsの実行環境でUbuntu/Node.js Latest LTSを使う
This commit is contained in:
commit
2679f1d552
2 changed files with 9 additions and 15 deletions
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
|
@ -6,14 +6,9 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with: { node-version: 14 }
|
||||
- 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-
|
||||
node-version: "lts/*"
|
||||
cache: yarn
|
||||
- run: yarn
|
||||
- run: yarn build
|
||||
- name: The working tree is clean.
|
||||
|
|
15
.github/workflows/publish.yml
vendored
15
.github/workflows/publish.yml
vendored
|
@ -4,16 +4,14 @@ on:
|
|||
branches: [master]
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-20.04
|
||||
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: "lts/*"
|
||||
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 }}
|
||||
|
|
Loading…
Add table
Reference in a new issue