Skip to content

Commit

Permalink
Add MAINTAINING.md and deploy action script
Browse files Browse the repository at this point in the history
  • Loading branch information
se030 committed Nov 18, 2023
1 parent b3bcf2c commit 00612fb
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/create-yorkie-app-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: create-yorkie-app-publish
on:
workflow_dispatch:
push:
branches:
- main
paths:
- tools/create-yorkie-app/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v2
- name: Setup Node πŸ”§
uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: package-lock.json
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: cd tools/create-yorkie-app && npm run build
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
33 changes: 33 additions & 0 deletions tools/create-yorkie-app/MAINTAINING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Maintaining create-yorkie-app

This package is an automated tool to scaffold an example project that shows practical usage of yorkie-js-sdk.

```bash
.
β”œβ”€β”€ MAINTAINING.md
β”œβ”€β”€ README.md
β”œβ”€β”€ frameworks.ts # abstract data object representing examples/ directory
β”œβ”€β”€ index.ts # main script
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── webpack.config.js
```

## Adding a New Example

Add information about your new example in [frameworks.ts](https://github.com/yorkie-team/yorkie-js-sdk/blob/main/tools/create-yorkie-app/frameworks.ts).

Choose or create an appropriate category (e.g. vanilla, react, nextjs, vue, ...) and add an object like below to variants array.

```ts
{
name: directory_name,
display: displayed_name_in_prompt
}
```

## Publishing a New Version

Update the version in [package.json](https://github.com/yorkie-team/yorkie-js-sdk/blob/main/tools/create-yorkie-app/package.json#L3).

Publication will be done via [create-yorkie-app-publish.yml](https://github.com/yorkie-team/yorkie-js-sdk/blob/main/.github/workflows/create-yorkie-app-publish.yml) when changes are pushed into main branch.

0 comments on commit 00612fb

Please sign in to comment.