Skip to content

Commit

Permalink
feat: add publishing to npm registry
Browse files Browse the repository at this point in the history
  • Loading branch information
roushou committed Jun 19, 2024
1 parent c086be6 commit 6faca89
Show file tree
Hide file tree
Showing 8 changed files with 1,980 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
11 changes: 11 additions & 0 deletions .changeset/lovely-foxes-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@coinbase-platform/onchain": minor
---

feat: integrate Coinbase Onchain Data API

- add RPC client
- add `listAddressTransactions`
- add `listBalanceDetails`
- add `listBalanceHistories`
- add `listBalances`
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm-version }}

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Set pnpm store directory path
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=$NPM_TOKEN
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "root",
"name": "@coinbase-plaform/monorepo",
"description": "Coinbase platform SDK",
"version": "0.0.0",
"private": true,
"type": "module",
Expand All @@ -15,10 +16,13 @@
"lint:unsafe": "biome lint . --write --unsafe",
"check": "biome check . --write",
"check:unsafe": "biome check . --write --unsafe",
"ci": "biome ci ."
"ci": "biome ci .",
"changeset:version": "changeset version",
"changeset:publish": "changeset publish"
},
"devDependencies": {
"@biomejs/biome": "^1.8.1",
"@changesets/cli": "^2.27.5",
"@types/node": "^20.14.5",
"@vitest/ui": "^1.6.0",
"msw": "^2.3.1",
Expand Down
28 changes: 25 additions & 3 deletions packages/onchain/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
{
"name": "@coinbase-platform/onchain",
"version": "0.1.0",
"version": "0.0.0",
"description": "Coinbase platform Onchain package",
"author": "roushou",
"author": "roushou <roushou9@gmail.com>",
"license": "MIT",
"homepage": "https://github.com/roushou/coinbase-platform#readme",
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/roushou/coinbase-platform.git",
"directory": "packages/onchain"
},
"bugs": {
"url": "https://github.com/roushou/coinbase-platform/issues"
},
"keywords": ["coinbase", "coinbase platform"],
"scripts": {
"build": "tsup",
"clean": "rimraf ./dist",
Expand All @@ -17,5 +28,16 @@
"optional": true
}
},
"keywords": ["coinbase", "coinbase platform"]
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": ["src", "dist"],
"engine": {
"node": "^18.0.0 || >=20.0.0"
}
}
Loading

0 comments on commit 6faca89

Please sign in to comment.