Skip to content

Commit

Permalink
build: build release 스크립트 추가 및 빌드 시 에러 해결 (#5)
Browse files Browse the repository at this point in the history
* fix: lint 설정 파일 문제 해결

* ci: add release lint test

* fix(docs): docs build error fix

* build: release script 추가

* ci: release publish script command change

* chore: changeset
  • Loading branch information
Dongkyuuuu authored Nov 6, 2023
1 parent ad371e3 commit cbc666f
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 16 deletions.
6 changes: 6 additions & 0 deletions .changeset/sharp-carrots-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@naver-maps/react": patch
"@naver-maps/vue": patch
---

package.json release 스크립트 추가
18 changes: 17 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,23 @@ on:
concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.2

- name: Install Dependencies
run: yarn install --immutable --immutable-cache

- name: Build
run: yarn lint

release:
needs: build
name: Release
runs-on: ubuntu-latest
steps:
Expand All @@ -23,7 +39,7 @@ jobs:
- name: Create Release Pull Request
uses: changesets/action@v1
with:
publish: yarn changeset publish
publish: yarn release
version: yarn changeset version
commit: "chore(release): version packages"
env:
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"start": "next start"
},
"dependencies": {
"@naver-maps/react": "*",
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/src/components/Map.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import { NaverMap } from "@naver-maps/react";
import type { PropsWithChildren } from "react";

Expand All @@ -12,6 +13,7 @@ export default function Map({ children }: PropsWithChildren) {
}}
clientId="krm0ye8xno"
>
{/* @ts-ignore */}
{children}
</NaverMap>
);
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/src/components/Marker.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import { NaverMarker } from "@naver-maps/react";
import type { PropsWithChildren } from "react";

export default function Map({ children }: PropsWithChildren) {
return (
<NaverMarker latitude={37.51347} longitude={127.041722}>
{/* @ts-ignore */}
{children ?? null}
</NaverMarker>
);
Expand Down
1 change: 0 additions & 1 deletion apps/docs/src/pages/middleware.ts

This file was deleted.

3 changes: 3 additions & 0 deletions apps/react/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"root": false
}
7 changes: 4 additions & 3 deletions apps/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"lint": "eslint -c .eslintrc.json 'src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "yarn lint --fix",
"build": "vite build -c ./vite.config.ts",
"release": "yarn build && yarn changeset publish",
"dev": "vite ./playground"
},
"repository": {
Expand All @@ -38,8 +39,7 @@
"react",
"react-map",
"react-naver-maps",
"naver-maps",
"naver-map"
"react-maps"
],
"publishConfig": {
"access": "public"
Expand All @@ -48,8 +48,9 @@
"react": "^18"
},
"devDependencies": {
"@changesets/cli": "*",
"@types/navermaps": "*",
"@types/node": "^18.15.0",
"@types/node": "^18.18.2",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.1.0",
Expand Down
3 changes: 3 additions & 0 deletions apps/vue/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"root": false
}
6 changes: 4 additions & 2 deletions apps/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"lint": "eslint -c .eslintrc.json 'src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "yarn lint --fix",
"build": "vite build -c ./vite.config.ts",
"dev": "vite ./playground"
"dev": "vite ./playground",
"release": "yarn build && yarn changeset publish"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -49,8 +50,9 @@
"vue": "^3"
},
"devDependencies": {
"@changesets/cli": "*",
"@types/navermaps": "*",
"@types/node": "^18.15.0",
"@types/node": "^18.18.2",
"@vitejs/plugin-vue": "^4.4.0",
"eslint": "^8.50.0",
"tsconfig": "*",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"packages/*"
],
"scripts": {
"release": "turbo run release",
"build": "turbo run build",
"dev": "turbo run dev",
"lint": "turbo run lint",
Expand Down
3 changes: 3 additions & 0 deletions packages/types/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"root": false
}
4 changes: 0 additions & 4 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"license": "MIT",
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"lint": "eslint -c .eslintrc.json 'src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "yarn lint --fix"
},
"devDependencies": {
"@types/navermaps": "*",
"@types/node": "^18.15.0",
Expand Down
24 changes: 21 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ __metadata:
languageName: node
linkType: hard

"@changesets/cli@npm:^2.26.2":
"@changesets/cli@npm:*, @changesets/cli@npm:^2.26.2":
version: 2.26.2
resolution: "@changesets/cli@npm:2.26.2"
dependencies:
Expand Down Expand Up @@ -1349,8 +1349,9 @@ __metadata:
version: 0.0.0-use.local
resolution: "@naver-maps/react@workspace:apps/react"
dependencies:
"@changesets/cli": "npm:*"
"@types/navermaps": "npm:*"
"@types/node": "npm:^18.15.0"
"@types/node": "npm:^18.18.2"
"@types/react": "npm:^18.0.28"
"@types/react-dom": "npm:^18.0.11"
"@vitejs/plugin-react": "npm:^4.1.0"
Expand All @@ -1373,8 +1374,9 @@ __metadata:
version: 0.0.0-use.local
resolution: "@naver-maps/vue@workspace:apps/vue"
dependencies:
"@changesets/cli": "npm:*"
"@types/navermaps": "npm:*"
"@types/node": "npm:^18.15.0"
"@types/node": "npm:^18.18.2"
"@vitejs/plugin-vue": "npm:^4.4.0"
eslint: "npm:^8.50.0"
tsconfig: "npm:*"
Expand Down Expand Up @@ -1874,6 +1876,15 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^18.18.2":
version: 18.18.8
resolution: "@types/node@npm:18.18.8"
dependencies:
undici-types: "npm:~5.26.4"
checksum: 6a8592675bfc0895c0a3ed1b942344d56538c178c0acab8fcbaf069a6bdeef6f8a416d5aa297a8ced34232919caf7658a4dd4eabf33a9ae1a755eeef9ea8e681
languageName: node
linkType: hard

"@types/node@npm:^20":
version: 20.8.2
resolution: "@types/node@npm:20.8.2"
Expand Down Expand Up @@ -9402,6 +9413,13 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~5.26.4":
version: 5.26.5
resolution: "undici-types@npm:5.26.5"
checksum: bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501
languageName: node
linkType: hard

"unified@npm:^10.0.0":
version: 10.1.2
resolution: "unified@npm:10.1.2"
Expand Down

0 comments on commit cbc666f

Please sign in to comment.