Skip to content

Commit

Permalink
fix: fix publishing files
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Ryazanov committed Jul 31, 2023
1 parent 562d807 commit 3c24d4b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.TINKOFF_BOT_PAT }}

- uses: actions/setup-node@v3
Expand All @@ -36,6 +37,9 @@ jobs:
- name: Build
run: npm run build

- name: Copy declaration files
run: npm run copy-declaration-files

- name: Release
run: npm run release
env:
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"prebenchmark": "npm install --no-save ts-node lodash ramda lazy.js underscore",
"docs": "node ./generate/docs/index.js",
"test": "jest --coverage",
"test:ci": "npm run test -- --maxWorkers=50%"
"test:ci": "npm run test -- --maxWorkers=50%",
"copy-declaration-files": "node tools/copy-declaration-files.js"
},
"description": "Fast, small and purely functional utility library",
"repository": "https://github.com/Tinkoff/utils.js",
Expand All @@ -23,6 +24,11 @@
"curry",
"performance"
],
"files": [
"build",
".npmignore",
"CHANGELOG.md"
],
"sideEffects": false,
"license": "Apache-2.0",
"devDependencies": {
Expand Down
14 changes: 14 additions & 0 deletions tools/copy-declaration-files.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const path = require('path');
const fsExtra = require('fs-extra');
const recursiveReadSync = require('recursive-readdir-sync');

Promise.all(
recursiveReadSync(path.join(__dirname, '..', 'ts_temp'))
.filter(fileName => fileName.endsWith('.d.ts'))
.map(fileName =>
fsExtra.copy(
fileName,
fileName.replace('ts_temp', 'build')
)
)
);

0 comments on commit 3c24d4b

Please sign in to comment.