From 2d0a7c0cd203b1f0898d62fdb29588b32e34d024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Mon, 2 Sep 2024 15:17:58 +0200 Subject: [PATCH 1/4] Update docs --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4c211a3..e5fd19a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ -# pool-tools +# stacks-tools -A collection of methods to help interact with the Stacks API and manage pools. +A collection of methods for calling the Stacks API and managing Stacks pools. -Supports ESM imports only. +## Quickstart + +Install dependencies with + +```shell +bun install +``` + +and build the package with + +```shell +bun run build +``` From b099b92727014e1f3818803ef364c7415473f451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Mon, 2 Sep 2024 15:20:14 +0200 Subject: [PATCH 2/4] Update ci command order --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 29e7b00..ac2632b 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "format": "prettier --write .", "check-types": "tsc --noEmit", "check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm", - "ci": "bun run check-format && bun run check-exports && bun run build" + "ci": "bun run build && bun run check-format && bun run check-exports" }, "devDependencies": { "@arethetypeswrong/cli": "0.15.4", From da524c98d93c4ce87340b708727dda925113e813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Mon, 2 Sep 2024 15:25:01 +0200 Subject: [PATCH 3/4] Update package name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ac2632b..72bdd56 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "stacks-tools", + "name": "@secretkeylabs/stacks-tools", "version": "0.1.0", "type": "module", "files": [ From 9595921a6469a8f8fcb30290c7c3479c27d412b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Mon, 2 Sep 2024 15:27:15 +0200 Subject: [PATCH 4/4] Update workflows --- .github/workflows/ci-main.yaml | 14 ++++++++++---- .github/workflows/ci-pr.yaml | 10 ++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-main.yaml b/.github/workflows/ci-main.yaml index ff11e8d..e37711f 100644 --- a/.github/workflows/ci-main.yaml +++ b/.github/workflows/ci-main.yaml @@ -19,12 +19,18 @@ jobs: uses: oven-sh/setup-bun@v2 - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Run CI run: bun run ci - - name: Publish to NPM package registry - run: npm publish --access=public --tag=latest + - name: Prepare .npmrc for publishing + run: | + echo "@secretkeylabs:registry=https://registry.npmjs.org/" > .npmrc + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGE_REGISTRY_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_PACKAGE_REGISTRY_TOKEN }} + + - name: Publish to NPM package registry + # https://github.com/oven-sh/bun/issues/1976 + run: bunx npm@latest publish --access=public --tag=latest diff --git a/.github/workflows/ci-pr.yaml b/.github/workflows/ci-pr.yaml index 7572085..fb7ae3a 100644 --- a/.github/workflows/ci-pr.yaml +++ b/.github/workflows/ci-pr.yaml @@ -18,7 +18,7 @@ jobs: uses: oven-sh/setup-bun@v2 - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Run CI run: bun run ci @@ -38,9 +38,15 @@ jobs: SHA: ${{ steps.sha.outputs.SHA }} CURRENT_VERSION: ${{ steps.current-version.outputs.CURRENT_VERSION }} + - name: Prepare .npmrc for publishing + run: | + echo "@secretkeylabs:registry=https://registry.npmjs.org/" > .npmrc + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc + env: + NPM_TOKEN: ${{ secrets.NPM_PACKAGE_REGISTRY_TOKEN }} + - name: Publish to NPM package registry # https://github.com/oven-sh/bun/issues/1976 run: bunx npm@latest publish --access=public --tag pr-$PR_NUMBER env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGE_REGISTRY_TOKEN }} PR_NUMBER: ${{ github.event.number }}