Skip to content

Commit 8e87054

Browse files
committed
ci: improve release.yml
- Format the code to have empty lines separating conceptual blocks; - Upgrade from ubuntu-18.04 to ubuntu-latest; - Upgrade from actions/checkout@v1 to actions/checkout@v2; - Set Node.js version from 12 to 12.x; - Add step to handle node_modules caching;
1 parent 3805187 commit 8e87054

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,34 @@
11
name: Release
2+
23
on: push
4+
5+
env:
6+
CI: true
7+
38
jobs:
49
release:
5-
name: Release
6-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
11+
712
steps:
813
- name: Checkout
9-
uses: actions/checkout@v1
14+
uses: actions/checkout@v2
15+
1016
- name: Setup Node.js
1117
uses: actions/setup-node@v1
1218
with:
13-
node-version: 12
19+
node-version: 12.x
20+
21+
- name: Use cached node_modules
22+
uses: actions/cache@v1
23+
with:
24+
path: node_modules
25+
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
26+
restore-keys: |
27+
${{ runner.os }}
28+
1429
- name: Install dependencies
1530
run: yarn --frozen-lockfile
31+
1632
- name: Release
1733
env:
1834
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)