Skip to content

Commit 0498200

Browse files
committed
ci: set fetch-depth to 0
1 parent 19ce849 commit 0498200

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: Publish
1+
name: Test and Publish
52
on:
63
push:
74
branches: [ master ]
5+
tags: [ 'v*' ]
86
pull_request:
97
branches: [ master ]
108
jobs:
@@ -15,6 +13,8 @@ jobs:
1513
node-version: [16.x, 18.x, 20.x]
1614
steps:
1715
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
1818
- name: Use Node.js ${{ matrix.node-version }}
1919
uses: actions/setup-node@v3
2020
with:
@@ -23,7 +23,7 @@ jobs:
2323
- run: yarn run test
2424
publish:
2525
needs: [test]
26-
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
26+
if: startsWith(github.ref, 'refs/tags/v')
2727
runs-on: ubuntu-latest
2828
steps:
2929
- uses: actions/checkout@v4

.github/workflows/pull-request.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41
name: Test
52
on: pull_request
63
jobs:
@@ -11,6 +8,8 @@ jobs:
118
node-version: [16.x, 18.x, 20.x]
129
steps:
1310
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
1413
- name: Use Node.js ${{ matrix.node-version }}
1514
uses: actions/setup-node@v3
1615
with:

0 commit comments

Comments
 (0)