Skip to content

Commit

Permalink
Setup actions (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
julia-script authored Feb 15, 2024
1 parent 446cd50 commit 18989f2
Show file tree
Hide file tree
Showing 16 changed files with 107 additions and 35 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/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
7 changes: 7 additions & 0 deletions .changeset/green-falcons-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@evmos/dappstore-cli": patch
"@evmos/dappstore-sdk": patch
"@evmos/dev-wrapper": patch
---

Release setup
13 changes: 0 additions & 13 deletions .github/workflows/actions.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI
on:
push:
branches:
- "**"

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

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

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Install Dependencies
run: bun install --frozen-lockfile

- name: Build
run: bun run build
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish
on:
workflow_run:
workflows: [CI]
branches: [main]
types: [completed]

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

permissions:
contents: write
pull-requests: write

jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Install Dependencies
run: bun install --frozen-lockfile

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/with-next-and-wagmi/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { client, dAppstoreClient, provider } from "@/wagmi";
import { client, DAppStoreClient, provider } from "@/wagmi";
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
import { useEffect, useState, useSyncExternalStore } from "react";
const createAccountStore = () => {
Expand Down
6 changes: 3 additions & 3 deletions examples/with-next-and-wagmi/src/wagmi.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createDAppstoreClient } from "@evmos/dappstore-sdk";
import { createDAppStoreClient } from "@evmos/DAppStore-sdk";
import { createWalletClient, custom } from "viem";
export const dAppstoreClient = createDAppstoreClient();
export const provider = dAppstoreClient.provider;
export const DAppStoreClient = createDAppStoreClient();
export const provider = DAppStoreClient.provider;
export const client = createWalletClient({
transport: custom(provider),
});
4 changes: 2 additions & 2 deletions examples/with-next/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";
import Image from "next/image";
import { createDAppstoreClient } from "@evmos/dappstore-sdk";
import { createDAppStoreClient } from "@evmos/DAppStore-sdk";

const client = createDAppstoreClient();
const client = createDAppStoreClient();
function App() {
// const [host, setState] = useState(0);

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "turbo dev",
"lint": "turbo lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"dev:setup-cli": "npm link"
"dev:setup-cli": "npm link",
"release": "bun run build && changeset publish"
},
"devDependencies": {
"@evmos/dappstore-cli": "workspace:*",
Expand All @@ -29,6 +30,6 @@
"examples/*"
],
"dependencies": {
"next": "^14.1.0"
"@changesets/cli": "^2.27.1"
}
}
5 changes: 3 additions & 2 deletions packages/dappstore-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
},
"peerDependencies": {},
"devDependencies": {
"@evmos/dappstore-sdk": "workspace:*",
"@commander-js/extra-typings": "^11.1.0",
"@evmos/config": "workspace:*",
"@evmos/dappstore-sdk": "workspace:*",
"@types/eslint": "^8.56.1",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"eslint": "^8.56.0",
"react": "^18.2.0",
"typescript": "^5.3.3",
"@commander-js/extra-typings": "^11.1.0"
"viem": "^2.7.9"
},
"dependencies": {
"@evmos/dev-wrapper": "workspace:*",
Expand Down
14 changes: 6 additions & 8 deletions packages/dappstore-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,19 @@
},
"devDependencies": {
"@evmos/config": "workspace:*",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"typescript": "^5.3.3",
"@trpc/client": "next",
"@trpc/react-query": "next",
"@trpc/server": "next",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"@types/uuid": "^9.0.8",
"lodash-es": "^4.17.21",
"uuid": "^9.0.1"
"typescript": "^5.3.3",
"uuid": "^9.0.1",
"viem": "^2.7.9"
},
"peerDependencies": {
"viem": ">=2.5",
"wagmi": ">=2.5",
"zod": ">=3"
},
"dependencies": {}
Expand Down
4 changes: 2 additions & 2 deletions packages/dappstore-sdk/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Client {
}
init() {
if (this.isInsideIframe === false) {
throw new Error("Cannot use DAppstore SDK outside of an iframe");
throw new Error("Cannot use DAppStore SDK outside of an iframe");
}
this.ack();
const unsubAccounts = trpcClient.provider.on.accountsChanged.subscribe(
Expand Down Expand Up @@ -161,7 +161,7 @@ class Client {
}
}

export const createDAppstoreClient = ({ autoInit = true } = {}) => {
export const createDAppStoreClient = ({ autoInit = true } = {}) => {
const client = new Client();
if (autoInit) client.init();
return client;
Expand Down
2 changes: 1 addition & 1 deletion packages/dappstore-sdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { createDAppstoreClient } from "./client";
export { createDAppStoreClient as createDAppstoreClient } from "./client";
export * from "./types/EIP1193Provider";
2 changes: 1 addition & 1 deletion packages/dev-wrapper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evmos/dev-wrapper",
"private": true,
"private": false,
"version": "0.0.0",
"type": "module",
"exports": {
Expand Down

0 comments on commit 18989f2

Please sign in to comment.