Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add github workflow for npm publish #26

Merged
merged 7 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# Publishing the package to the npm registry when the version number changes
# See https://github.com/marketplace/actions/npm-publish for more information
name: Publish Package to npmjs

on:
push:
branches: main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
- run: npm ci
- run: npm run build
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
access: 'public'

55 changes: 27 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tariproject/tarijs",
"version": "0.1.19",
"name": "@tari-project/tarijs",
"version": "0.1.20",
"description": "",
"main": "./dist/index.js",
"type": "module",
Expand All @@ -14,8 +14,8 @@
"license": "ISC",
"dependencies": {
"@metamask/providers": "^9.0.0",
"@tariproject/wallet_jrpc_client": "https://gitpkg.now.sh/tari-project/tari-dan/clients/javascript/wallet_daemon_client?development&scripts.postinstall=npm%20run%20build",
"@tariproject/typescript-bindings": "https://gitpkg.now.sh/tari-project/tari-dan/bindings?development&scripts.postinstall=npm%20run%20tsc"
"@tari-project/wallet_jrpc_client": "^1.0.8",
"@tari-project/typescript-bindings": "^1.0.3"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.2.3",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export default {
nodeResolve(),
typescript(),
],
external: ["@tariproject/wallet_jrpc_client", "@metamask/providers"]
external: ["@tari-project/wallet_jrpc_client", "@metamask/providers"]
}
2 changes: 1 addition & 1 deletion src/providers/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SubstateType } from "@tariproject/typescript-bindings";
import type { SubstateType } from "@tari-project/typescript-bindings";
import {
Account,
SubmitTransactionRequest,
Expand Down
2 changes: 1 addition & 1 deletion src/providers/metamask/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {MetaMaskInpageProvider} from '@metamask/providers';
import {connectSnap, getSnap, isFlask, Snap} from "./utils";
import {Maybe} from "@metamask/providers/dist/utils";
import {Account} from "../types";
import { SubstateType } from "@tariproject/typescript-bindings";
import { SubstateType } from "@tari-project/typescript-bindings";

export const MetamaskNotInstalled = 'METAMASK_NOT_INSTALLED';
export const MetamaskIsNotFlask = 'METAMASK_IS_NOT_FLASK';
Expand Down
2 changes: 1 addition & 1 deletion src/providers/tari_universe/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
WindowSize,
} from "./types";
import { TariProvider } from "../index";
import { AccountsGetBalancesResponse, SubstateType } from "@tariproject/wallet_jrpc_client";
import { AccountsGetBalancesResponse, SubstateType } from "@tari-project/wallet_jrpc_client";

export class TariUniverseProvider implements TariProvider {
public providerName = "TariUniverse";
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wallet_daemon/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
SubstateType,
SubstatesListRequest,
KeyBranch,
} from "@tariproject/wallet_jrpc_client";
} from "@tari-project/wallet_jrpc_client";
import {WebRtcRpcTransport} from "./webrtc_transport";

export const WalletDaemonNotConnected = 'WALLET_DAEMON_NOT_CONNECTED';
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wallet_daemon/webrtc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {TariPermissions} from "./tari_permissions";
import {transports} from "@tariproject/wallet_jrpc_client";
import {transports} from "@tari-project/wallet_jrpc_client";

class SignaligServer {
private _token?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wallet_daemon/webrtc_transport.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {transports} from "@tariproject/wallet_jrpc_client";
import {transports} from "@tari-project/wallet_jrpc_client";
import {TariConnection} from "./webrtc";

export class WebRtcRpcTransport implements transports.RpcTransport {
Expand Down