Skip to content

Commit

Permalink
fix: Add Readmes to prepare for open source (#84)
Browse files Browse the repository at this point in the history
* remove signal test

* test

* remove signal

* test

* push

* remove signal

* re-introduce-signal

* add deep link test

* versioning

* change app_id

* add readmes

* formatting

* release

* update release please
  • Loading branch information
andy-t-wang authored Oct 25, 2024
1 parent a83c9fb commit 4d2f5a0
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 17 deletions.
45 changes: 38 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: New release
name: New Release

on:
push:
Expand All @@ -17,12 +17,13 @@ jobs:
uses: google-github-actions/release-please-action@v3
with:
command: manifest
release-type: node

publish:
publish-npm:
needs: release
name: Publish
name: Publish to npm
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.releases_created }}
if: ${{ needs.release.outputs.releases_created == 'true' }}
steps:
- uses: actions/checkout@v3

Expand All @@ -43,7 +44,37 @@ jobs:
- name: Build
run: pnpm build

- name: Publish
run: pnpm publish -r --report-summary
- name: Publish to npm
run: pnpm publish --report-summary
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-github:
needs: release
name: Publish to GitHub Package Registry
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.releases_created == 'true' }}
steps:
- uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 9

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: "pnpm"
registry-url: "https://npm.pkg.github.com"

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Publish to GitHub
run: pnpm publish --report-summary
env:
NODE_AUTH_TOKEN: ${{ secrets.GIT_HUB_TOKEN }}
3 changes: 0 additions & 3 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
{
"minikit-js": "0.0.22-internal-alpha"
}
3 changes: 3 additions & 0 deletions demo/with-next/components/ClientContent/Camera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export const CameraComponent = () => {
Open Camera
</div>
</label>
<button className="grid justify-items-center gap-y-2 bg-green-500 p-4 rounded-lg text-white">
Open Universal Link
</button>
<label
className={
" items-center justify-center rounded-lg bg-2f2b43/5 hover:bg-2f2b43/10"
Expand Down
9 changes: 7 additions & 2 deletions demo/with-next/components/ClientContent/ExternalLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ export const ExternalLinks = () => {
Valid Associated Domain (Link)
</Link>
<button
onClick={() => window.open("https://worldcoin.org/world-chain")}
onClick={() => {
window.open(
"https://worldcoin.org/mini-app?app_id=app_staging_d3b49eb04b497130e18533b9d8846319",
"_blank"
);
}}
className="text-white bg-green-500 hover:bg-blue-300 transition p-4 leading-[1] rounded-lg"
>
Valid Associated Domain (Button)
Internal Deep Link Test
</button>
<Link
href="https://docs.worldcoin.org"
Expand Down
24 changes: 22 additions & 2 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
### Minikit JS
# Minikit-JS

Minikit is still in pre-release. If you're interested in integrating Minikit into your project, please contact us at [[email protected]](mailto:[email protected]).
## 🚀 Getting Started

Minikit is currently available on npm. To install, run:
`pnpm i @worldcoin/minikit-js`

or use the CDN:
`https://cdn.jsdelivr.net/npm/@worldcoin/minikit-js@[version]/+esm`

For comprehensive setup instructions and usage examples, visit our [developer documentation](https://docs.world.org/mini-apps).

## 🛠 ️Developing Locally

To run the example mini app locally:

```
pnpm i
cd demo/with-next
pnpm dev
```

This will launch a demo mini app with all essential commands implemented, allowing you to explore and test the features.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@worldcoin/minikit-js",
"version": "1.0",
"version": "1.0.0",
"homepage": "https://docs.worldcoin.org/mini-apps",
"description": "Minikit-js is our SDK for building mini-apps.",
"license": "MIT",
Expand Down
25 changes: 25 additions & 0 deletions packages/react/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Minikit-React

This package contains helper functions and components for building mini apps with React. This is not required to run a mini app and is only a convenience package for developers as it contains nice abstractions.

## 🚀 Getting Started

Minikit is currently available on npm. To install, run:

```
pnpm i @worldcoin/minikit-react
```

For comprehensive setup instructions and usage examples, visit our [developer documentation](https://docs.world.org/mini-apps).

## 🛠 ️Developing Locally

To run the example mini app locally:

```
pnpm i
cd demo/with-next
pnpm dev
```

This will launch a demo mini app with all essential commands implemented, allowing you to explore and test the features.
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@worldcoin/minikit-react",
"version": "1.0",
"version": "1.0.0",
"homepage": "https://docs.worldcoin.org/mini-apps",
"description": "Minikit-react is a set of hooks for building mini-apps",
"license": "MIT",
Expand Down
15 changes: 14 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"release-type": "node",
"packages": {
"src": {
"packages/react": {
"component": "react",
"skip-github-release": true
},
"packages/core": {
"component": "core",
"skip-github-release": true
},
".": {
"component": "minikit-js",
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": false,
Expand All @@ -14,6 +22,11 @@
{
"type": "node-workspace",
"merge": false
},
{
"type": "linked-versions",
"groupName": "group",
"components": ["core", "react", "minikit-js"]
}
],
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
Expand Down

0 comments on commit 4d2f5a0

Please sign in to comment.