Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(workflow): add cache to workflows using actions/setup-node #404

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
push:
branches:
- master
- 'v*'
- "v*"
oscard0m marked this conversation as resolved.
Show resolved Hide resolved
pull_request: {}
schedule:
- cron: '0 3 * * *' # daily, at 3am
- cron: "0 3 * * *" # daily, at 3am
oscard0m marked this conversation as resolved.
Show resolved Hide resolved

jobs:
lint:
Expand All @@ -16,9 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12.x
cache: npm
oscard0m marked this conversation as resolved.
Show resolved Hide resolved

- name: get yarn cache dir
id: yarn-cache
Expand Down Expand Up @@ -48,9 +49,10 @@ jobs:

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
oscard0m marked this conversation as resolved.
Show resolved Hide resolved

- name: get yarn cache dir
id: yarn-cache
Expand Down Expand Up @@ -79,9 +81,10 @@ jobs:

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12.x
cache: npm
oscard0m marked this conversation as resolved.
Show resolved Hide resolved

- name: get yarn cache dir
id: yarn-cache
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- '*'
- "*"
oscard0m marked this conversation as resolved.
Show resolved Hide resolved

jobs:
release:
Expand All @@ -12,10 +12,11 @@ jobs:

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12.x
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"
oscard0m marked this conversation as resolved.
Show resolved Hide resolved
cache: npm
oscard0m marked this conversation as resolved.
Show resolved Hide resolved

- run: npm publish
env:
Expand Down