Skip to content

Commit 9489eca

Browse files
authored
build: tweak release action
1 parent a5fd035 commit 9489eca

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

.github/workflows/release.yml

+11-15
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,20 @@ jobs:
1212
with:
1313
# alias support: https://github.com/actions/setup-node/issues/26
1414
node-version: '12'
15-
- name: Cache NPM dependencies
16-
uses: actions/cache@v1
15+
- name: Get yarn cache directory path
16+
id: yarn-cache-dir-path
17+
run: echo "::set-output name=dir::$(yarn cache dir)"
18+
- uses: actions/cache@v2
19+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
1720
with:
18-
path: node_modules
19-
key: ${{ runner.OS }}-npm-cache-${{ matrix.os }}
21+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
22+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2023
restore-keys: |
21-
${{ runner.OS }}-npm-cache-${{ matrix.os }}
24+
${{ runner.os }}-yarn-
2225
- name: Install Dependencies
23-
run: |
24-
npm install -g yarn
25-
yarn --frozen-lockfile --non-interactive
26-
- uses: actions/checkout@v2
26+
run: yarn
2727
- name: Semantic Release
28-
uses: cycjimmy/semantic-release-action@v2
29-
with:
30-
extra_plugins: |
31-
@semantic-release/git
32-
@semantic-release/[email protected]
28+
run: npx semantic-release
3329
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3531
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)