From 4265ee5d39f01a1132606467777579bdffb85d87 Mon Sep 17 00:00:00 2001 From: Guilherme Bernal Date: Tue, 19 Jan 2021 20:22:46 +0000 Subject: [PATCH] fix: build before publish --- .github/workflows/release.yml | 3 +++ .github/workflows/release_dev.yml | 3 +++ .gitignore | 1 + 3 files changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d21f19..bb10b58 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,10 @@ jobs: - run: | npm install -g json && json -I -f package.json -e ' this.version = "${{ github.ref }}".replace("refs/tags/", ""); + this.main = "dist/src/index.js"; + this.types = "dist/src/index.d.ts"; ' + - run: npm run build - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.github/workflows/release_dev.yml b/.github/workflows/release_dev.yml index e714c4e..75bd644 100644 --- a/.github/workflows/release_dev.yml +++ b/.github/workflows/release_dev.yml @@ -15,7 +15,10 @@ jobs: - run: | npm install -g json && json -I -f package.json -e ' this.version = "0.0.0-dev.'$(date -u +'%Y%m%d%H%M%S')'"; + this.main = "dist/src/index.js"; + this.types = "dist/src/index.d.ts"; ' + - run: npm run build - run: npm publish --tag dev env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.gitignore b/.gitignore index 2676f60..4ed8292 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,4 @@ typings/ .next package-lock.json +dist