generated from codex-team/typescript-lib-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from editor-js/publish-package
Chore(publish): Publish package
- Loading branch information
Showing
2 changed files
with
76 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,50 @@ | ||
name: Publish package to NPM | ||
name: Publish all packages to NPM | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
NOTIFY_WEBHOOK_LINK: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }} | ||
|
||
jobs: | ||
publish-and-notify: | ||
uses: codex-team/github-workflows/.github/workflows/npm-publish-and-notify-reusable.yml@main | ||
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }} | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.1.0 | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Build all packages | ||
run: yarn build | ||
|
||
- name: Publish all packages | ||
run: yarn workspaces foreach npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
notify: | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get package info | ||
id: package | ||
uses: codex-team/action-nodejs-package-info@v1 | ||
|
||
- name: Send a message | ||
uses: codex-team/action-codexbot-notify@v1 | ||
with: | ||
webhook: ${{ env.NOTIFY_WEBHOOK_LINK }} | ||
message: '📦 [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) ${{ steps.package.outputs.version }} was published' | ||
parse_mode: 'markdown' | ||
disable_web_page_preview: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,33 @@ | ||
# typescript-lib-template | ||
A quick start template for a new TypeScript library | ||
|
||
[![NPM version](https://img.shields.io/npm/v/@codexteam/typescript-lib-template?style=flat-square)](https://www.npmjs.com/package/@codexteam/typescript-lib-template) | ||
[![License](https://img.shields.io/npm/l/@codexteam/typescript-lib-template?style=flat-square)](https://www.npmjs.com/package/@codexteam/typescript-lib-template) | ||
|
||
## How to use | ||
1. Click [here](https://github.com/codex-team/typescript-lib-template/generate) and fill setting for new repository | ||
2. Change package name in `package.json` and other fields if necessary | ||
3. Change NPM package scope from [workflow file](./.github/workflows/main.yml) or remove it | ||
4. Fill `NPM_TOKEN` and `CODEX_BOT_WEBHOOK` secrets in your repository or organization settings | ||
5. Start writing your new library! | ||
|
||
## Features | ||
|
||
- TypeScript support | ||
- ESlint support with [eslint-config-codex](http://github.com/codex-team/eslint-config/) | ||
- Unit testing with [Jest](http://jestjs.io) | ||
- GitHub Actions configuration for test/lint/build/publish purposes | ||
|
||
## About team | ||
|
||
We are CodeX and we build products for developers and makers. | ||
|
||
Follow us on Twitter: [twitter.com/codex_team](https://twitter.com/codex_team) | ||
|
||
Feel free to contact: <a href="mailto:team@codex.so?subject=Editor.js feedback">team@codex.so</a> | ||
|
||
[codex.so](https://codex.so) | ||
# Editor.js utils | ||
Utils useful for Editor.js tools development | ||
|
||
## Packages | ||
- Caret | ||
- Dom | ||
- Helpers | ||
- Keyboard | ||
|
||
You can use them via installing from npm: | ||
|
||
``` | ||
npm install @editorjs/caret | ||
``` | ||
``` | ||
npm install @editorjs/helpers | ||
``` | ||
``` | ||
npm install @editorjs/dom | ||
``` | ||
``` | ||
npm install @editorjs/keyboard | ||
``` | ||
|
||
# About CodeX | ||
|
||
<img align="right" width="120" height="120" src="https://codex.so/public/app/img/codex-logo.svg" hspace="50"> | ||
|
||
CodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are [open](https://codex.so/join) for young people who want to constantly improve their skills and grow professionally with experiments in cutting-edge technologies. | ||
|
||
| 🌐 | Join 👋 | Twitter | Instagram | | ||
| -- | -- | -- | -- | | ||
| [codex.so](https://codex.so) | [codex.so/join](https://codex.so/join) |[@codex_team](http://twitter.com/codex_team) | [@codex_team](http://instagram.com/codex_team/) | |