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

fix: fix CLI's npm build #1617

Merged
merged 17 commits into from
Nov 13, 2024
53 changes: 53 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "CLI: Build & Install"

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install dependencies
working-directory: ./create-onchain
run: bun install

- name: Build CLI
working-directory: ./create-onchain
run: bun run build

- name: Make CLI executable
run: chmod +x ./create-onchain/dist/esm/cli.js

- name: Create test project
run: |
mkdir test-project
cd test-project
yes "" | ../create-onchain/dist/esm/cli.js
env:
CI: true

- name: List directories
run: ls -la test-project
dschlabach marked this conversation as resolved.
Show resolved Hide resolved

- name: Install & Build test project
working-directory: ./test-project/my-onchainkit-app
run: |
npm install
npm run build
4 changes: 2 additions & 2 deletions create-onchain/templates/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"react": "^18",
"react-dom": "^18",
"@tanstack/react-query": "^5",
"wagmi": "^2.12.25",
"viem": "^2.21.40"
"viem": "^2.17.4",
"wagmi": "^2.11.0"
brendan-defi marked this conversation as resolved.
Show resolved Hide resolved
},
"devDependencies": {
"@types/node": "^20",
Expand Down