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

Use pnpm instead of yarn #20

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 19 additions & 28 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,48 @@
name: Publish all packages to NPM
name: Publish Packages

on:
push:
branches:
- main
workflow_call:
secrets:
NPM_TOKEN:
required: true
CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT:
required: true

env:
NOTIFY_WEBHOOK_LINK: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}
- 'main'

jobs:
publish:
publish-npm:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Use Node.js v18
uses: actions/setup-node@v4
with:
always-auth: true
node-version: 22.1.0
registry-url: 'https://registry.npmjs.org/'
registry-url: https://registry.npmjs.org/
cache: pnpm

- name: Create .npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- run: pnpm install

- name: Install dependencies
run: yarn install
- run: npm run build

- name: Publish all packages
run: yarn publish:ci
- run: pnpm run publish:ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true

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
925 changes: 0 additions & 925 deletions .yarn/releases/yarn-4.4.0.cjs

This file was deleted.

5 changes: 0 additions & 5 deletions .yarnrc

This file was deleted.

3 changes: 0 additions & 3 deletions .yarnrc.yml

This file was deleted.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"test": "vitest run",
"lint": "eslint",
"lint:fix": "yarn lint --fix",
"generate-docs": "ts-node scripts/generateReadme.ts",
"publish:ci": "ts-node scripts/publish.ts"
"publish:ci": "ts-node scripts/publish.ts",
"generate-docs": "ts-node scripts/generateReadme.ts"
},
"devDependencies": {
"@types/fs-extra": "^11",
Expand All @@ -38,6 +38,5 @@
"typescript": "^5.4.5",
"typescript-eslint": "^7.9.0",
"vitest": "1.4.0"
},
"packageManager": "[email protected]"
}
}
1 change: 1 addition & 0 deletions packages/caret/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.0.5",
"main": "dist/index.js",
"license": "MIT",
"repository": "https://github.com/editor-js/utils/tree/main/packages/caret",
"scripts": {
"build": "tsc"
},
Expand Down
1 change: 1 addition & 0 deletions packages/dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.0.6",
"main": "dist/index.js",
"license": "MIT",
"repository": "https://github.com/editor-js/utils/tree/main/packages/dom",
"scripts": {
"build": "tsc"
},
Expand Down
1 change: 1 addition & 0 deletions packages/helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.0.5",
"main": "dist/index.js",
"license": "MIT",
"repository": "https://github.com/editor-js/utils/tree/main/packages/helpers",
"scripts": {
"build": "tsc --project tsconfig.build.json"
},
Expand Down
1 change: 1 addition & 0 deletions packages/keyboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.0.5",
"main": "dist/index.js",
"license": "MIT",
"repository": "https://github.com/editor-js/utils/tree/main/packages/keyboard",
"scripts": {
"build": "tsc"
},
Expand Down
Loading
Loading