Skip to content

Commit 3c24d4b

Browse files
author
Alexey Ryazanov
committed
fix: fix publishing files
1 parent 562d807 commit 3c24d4b

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
2424
- uses: actions/checkout@v3
2525
with:
26+
fetch-depth: 0
2627
token: ${{ secrets.TINKOFF_BOT_PAT }}
2728

2829
- uses: actions/setup-node@v3
@@ -36,6 +37,9 @@ jobs:
3637
- name: Build
3738
run: npm run build
3839

40+
- name: Copy declaration files
41+
run: npm run copy-declaration-files
42+
3943
- name: Release
4044
run: npm run release
4145
env:

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"prebenchmark": "npm install --no-save ts-node lodash ramda lazy.js underscore",
1111
"docs": "node ./generate/docs/index.js",
1212
"test": "jest --coverage",
13-
"test:ci": "npm run test -- --maxWorkers=50%"
13+
"test:ci": "npm run test -- --maxWorkers=50%",
14+
"copy-declaration-files": "node tools/copy-declaration-files.js"
1415
},
1516
"description": "Fast, small and purely functional utility library",
1617
"repository": "https://github.com/Tinkoff/utils.js",
@@ -23,6 +24,11 @@
2324
"curry",
2425
"performance"
2526
],
27+
"files": [
28+
"build",
29+
".npmignore",
30+
"CHANGELOG.md"
31+
],
2632
"sideEffects": false,
2733
"license": "Apache-2.0",
2834
"devDependencies": {

tools/copy-declaration-files.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const path = require('path');
2+
const fsExtra = require('fs-extra');
3+
const recursiveReadSync = require('recursive-readdir-sync');
4+
5+
Promise.all(
6+
recursiveReadSync(path.join(__dirname, '..', 'ts_temp'))
7+
.filter(fileName => fileName.endsWith('.d.ts'))
8+
.map(fileName =>
9+
fsExtra.copy(
10+
fileName,
11+
fileName.replace('ts_temp', 'build')
12+
)
13+
)
14+
);

0 commit comments

Comments
 (0)