From f512b5d5d9bd1965de7817584d7c915e35b6a605 Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Thu, 9 Dec 2021 11:40:31 +0300 Subject: [PATCH] Fix Release script (#709) --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 8 ++++++++ package.json | 7 +++---- tsconfig.build.json | 15 +++++++++++++++ tsconfig.json | 3 +-- 5 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 tsconfig.build.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aae9572595..5d07390396 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,9 +21,9 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-17-yarn-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }} restore-keys: | - ${{ runner.os }}-17-yarn- + ${{ runner.os }}-${{ matrix.node-version }}-yarn- - name: Install Dependencies using Yarn run: yarn - run: yarn build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f8b018925..65be089bf6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,9 +21,17 @@ jobs: with: node-version: 16.x + - name: Setup NPM credentials + run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Install Dependencies run: yarn + - name: Build Packages + run: yarn build + - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@master diff --git a/package.json b/package.json index 426702572a..5b3bae6670 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,10 @@ { "scripts": { "format": "prettier . --write", - "prebuild": "rimraf packages/**/dist", - "build": "tsc --project tsconfig.json && bob build", + "prebuild": "rimraf packages/*/dist", + "build": "tsc --project tsconfig.build.json && bob build", "test": "jest --passWithNoTests", - "prerelease": "yarn build", - "release": "changeset publish", + "release": "yarn build && changeset publish", "release:canary": "(node scripts/canary-release.js && yarn build && yarn changeset publish --tag canary) || echo Skipping Canary..." }, "repository": { diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000000..7560d26eb1 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + }, + "exclude": [ + "**/test/*.ts", + "*.spec.ts", + "**/tests", + "**/test-assets", + "**/test-files", + "packages/testing" + ] +} diff --git a/tsconfig.json b/tsconfig.json index e45989ad2d..9aafcceae2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,8 @@ { "compilerOptions": { - "incremental": true, "baseUrl": ".", "outDir": "dist", - "rootDir": "packages", + "esModuleInterop": true, "allowSyntheticDefaultImports": true, "importHelpers": true,