From e096db4a8e243f165258bacbbf7edd7445bf8713 Mon Sep 17 00:00:00 2001 From: "Leonardo C. Martins" Date: Fri, 20 Sep 2024 16:29:59 -0300 Subject: [PATCH 1/2] fix: build package before publishing --- .changeset/wet-houses-perform.md | 5 +++++ .github/workflows/release-npm-changeset.yml | 2 +- package.json | 1 + packages/ui/package.json | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .changeset/wet-houses-perform.md diff --git a/.changeset/wet-houses-perform.md b/.changeset/wet-houses-perform.md new file mode 100644 index 00000000..1f4d8326 --- /dev/null +++ b/.changeset/wet-houses-perform.md @@ -0,0 +1,5 @@ +--- +"@fuels/ui": patch +--- + +- Added pnpm build to the publish action, ensuring "dist" folder will be published diff --git a/.github/workflows/release-npm-changeset.yml b/.github/workflows/release-npm-changeset.yml index f0fe5940..5b98cc34 100644 --- a/.github/workflows/release-npm-changeset.yml +++ b/.github/workflows/release-npm-changeset.yml @@ -50,7 +50,7 @@ jobs: id: changesets uses: FuelLabs/changesets-action@main with: - publish: pnpm changeset publish --tag next + publish: pnpm release commit: "ci(changesets): versioning packages" title: "ci(changesets): versioning packages" createGithubReleases: aggregate diff --git a/package.json b/package.json index 9576bd34..7b3fc553 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "node:stop": "make -C ./docker stop", "node:restart": "make -C ./docker restart", "prepare": "husky install", + "release": "pnpm build:lib && pnpm changeset publish --tag next", "start": "pnpm turbo:run start", "test": "pnpm turbo:run test", "test:all": "run-p test test:e2e", diff --git a/packages/ui/package.json b/packages/ui/package.json index 26f25362..b31217e4 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -18,13 +18,13 @@ "publishConfig": { "access": "public", "main": "./dist/index.cjs.js", - "module": "./dist/index.cjs.js", + "module": "./dist/index.esm.js", "types": "./dist/index.d.ts", "typings": "./dist/index.d.ts", "exports": { ".": { "import": "./dist/index.esm.js", - "require": "./dist/index.cjs.jg", + "require": "./dist/index.cjs.js", "default": "./dist/index.cjs.js", "types": "./dist/index.d.ts", "typings": "./dist/index.d.ts" From be09cd4fec0cdcb692107f92a27e229553981712 Mon Sep 17 00:00:00 2001 From: "Leonardo C. Martins" Date: Fri, 20 Sep 2024 18:15:09 -0300 Subject: [PATCH 2/2] fix: use build on action instead of package.json --- .github/workflows/release-npm-changeset.yml | 5 ++++- package.json | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-npm-changeset.yml b/.github/workflows/release-npm-changeset.yml index 5b98cc34..0d3d21f2 100644 --- a/.github/workflows/release-npm-changeset.yml +++ b/.github/workflows/release-npm-changeset.yml @@ -46,11 +46,14 @@ jobs: git config --global user.name "${{ github.actor }}" git config --global user.email "${{ github.actor }}@users.noreply.github.com" + - name: Build packages + run: pnpm build:lib + - name: Create Release Pull Request or Publish to NPM id: changesets uses: FuelLabs/changesets-action@main with: - publish: pnpm release + publish: pnpm changeset publish --tag next commit: "ci(changesets): versioning packages" title: "ci(changesets): versioning packages" createGithubReleases: aggregate diff --git a/package.json b/package.json index 7b3fc553..9576bd34 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "node:stop": "make -C ./docker stop", "node:restart": "make -C ./docker restart", "prepare": "husky install", - "release": "pnpm build:lib && pnpm changeset publish --tag next", "start": "pnpm turbo:run start", "test": "pnpm turbo:run test", "test:all": "run-p test test:e2e",