Skip to content

Commit

Permalink
feat: changesets 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
alstn2468 committed Jan 3, 2024
1 parent 07adbad commit fcbcfb3
Show file tree
Hide file tree
Showing 8 changed files with 1,886 additions and 724 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Changesets
on:
push:
branches:
- main
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
version:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: 18.17.0

- name: install pnpm
run: npm i pnpm@latest -g

- name: install dependencies
run: pnpm install

- name: build
run: pnpm package build

- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: create and publish versions
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: '✈️ Publish maplestory-open-api-js'
title: '✈️ Publish maplestory-open-api-js'
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions examples/client-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "client-demo",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
Expand Down
1 change: 1 addition & 0 deletions examples/server-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"description": "",
"main": "index.ts",
"private": true,
"scripts": {
"dev": "nodemon --watch src --exec 'npx' 'ts-node' index.ts"
},
Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"prepare": "husky install",
"package": "pnpm --filter maplestory-open-api-js",
"server-demo": "pnpm --filter server-demo",
"client-demo": "pnpm --filter client-demo"
"client-demo": "pnpm --filter client-demo",
"ci:version": "changeset version && pnpm install --no-frozen-lockfile",
"ci:publish": "changeset publish"
},
"lint-staged": {
"**/*.{js,ts,tsx}": [
Expand All @@ -29,18 +31,19 @@
"node": ">=18.16.1"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@types/eslint": "^8",
"@types/node": "^20.10.5",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"eslint": "^8.2.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-unused-imports": "^3.0.0"
"eslint-plugin-unused-imports": "^3.0.0",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1"
}
}
5 changes: 4 additions & 1 deletion packages/maplestory-open-api-js/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "maplestory-open-api-js",
"version": "1.0.3",
"version": "1.0.4",
"repository": "https://github.com/alstn2468/maplestory-open-api-js",
"author": "alstn2468 <alstn2468_@naver.com>",
"license": "MIT",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
"types": "dist/index.d.ts",
"publishConfig": {
"access": "public"
},
"scripts": {
"dev": "tsc && vite build --watch",
"build": "tsc && vite build"
Expand Down
Loading

0 comments on commit fcbcfb3

Please sign in to comment.