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 }} 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 +``` diff --git a/package.json b/package.json index 29e7b00..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": [ @@ -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",