Skip to content

Commit ef3a1cf

Browse files
authored
Merge pull request #18 from NaverPayDev/feature/17_en
[공통] README 영문화 및 소소한 수정
2 parents 7a1fa68 + 1bb1c67 commit ef3a1cf

File tree

9 files changed

+173
-46
lines changed

9 files changed

+173
-46
lines changed

README.ko.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# @NaverPayDev/changeset-actions
2+
3+
> [See English README](./README.md)
4+
5+
- changeset 기반의 다양한 액션을 모아놓은 레포입니다.
6+
- 해당 레포는 모노레포 구조로 여러 액션을 포함하며, 필요한 액션만 선택하여 사용하실 수 있습니다.
7+
- 사용법은 하단 액션 목록의 각 액션별 리드미를 참고해주세요.
8+
9+
## 관리 중인 액션 목록
10+
11+
### [detect add](./detect-add/README.ko.md)
12+
13+
PR의 변경점을 파악하여 `.changeset` 하위에 변경된 파일에 대한 정보를 기재할 수 있도록 유도하는 action
14+
15+
### [canary](./canary-publish/README.ko.md)
16+
17+
`.changeset` 하위 변경된 패키지들의 안전성을 테스트하기 위해 canary 버전으로 배포를 도와주는 action
18+
19+
### [publish](./publish/README.ko.md)
20+
21+
`.changeset` 하위에 변경된 패키지들을 배포하고 자동으로 CHANGELOG 를 작성해주는 action

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
# @NaverPayDev/changeset-actions
22

3-
- changeset 기반의 다양한 액션을 모아놓은 레포입니다.
4-
- 해당 레포는 모노레포 구조로 여러 액션을 포함하며, 필요한 액션만 선택하여 사용하실 수 있습니다.
5-
- 사용법은 하단 액션 목록의 각 액션별 리드미를 참고해주세요.
3+
> [한글 README 보기](./README.ko.md)
64
7-
## 관리 중인 액션 목록
5+
- A repository containing various actions based on changesets.
6+
- This repository follows a monorepo structure and includes multiple actions, allowing you to use only the actions you need.
7+
- For usage instructions, please refer to the README of each action listed below.
88

9-
### detect add
9+
## Managed Action List
1010

11-
PR의 변경점을 파악하여 `.changeset` 하위에 변경된 파일에 대한 정보를 기재할 수 있도록 유도하는 action
11+
### [detect add](./detect-add/README.md)
1212

13-
### canary
13+
An action that detects changes in a pull request and guides users to document the changes in the `.changeset` directory.
1414

15-
`.changeset` 하위 변경된 패키지들의 안전성을 테스트하기 위해 canary 버전으로 배포를 도와주는 action
15+
### [canary](./canary-publish/README.md)
1616

17-
### publish
17+
An action that helps deploy canary versions of packages under the `.changeset` directory to test their stability.
1818

19-
`.changeset` 하위에 변경된 패키지들을 배포하고 자동으로 CHANGELOG 를 작성해주는 action
19+
### [publish](./publish/README.md)
20+
21+
An action that publishes the packages under the `.changeset` directory and automatically generates a CHANGELOG.

canary-publish/README.ko.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# changesets-canary-publish
2+
3+
## 설명
4+
5+
- changeset을 이용한 패키지 배포 플로우를 사용할 때, 해당 PR의 변경점을 파악하여 `.changeset` 하위 변경된 패키지들을 Canary 배포할 수 action 입니다.
6+
7+
## 사용 방법
8+
9+
- 프로젝트 root의 `.github/workflows` 경로에 아래와 같이 `.yaml` 파일을 작성합니다.
10+
11+
```yaml
12+
# 기호에 맞게 변경해주세요
13+
name: changeset canary publish
14+
15+
on:
16+
issue_comment:
17+
types:
18+
- created
19+
20+
concurrency: ${{ github.workflow }}-${{ github.ref }}
21+
22+
jobs:
23+
canary:
24+
if: ${{ github.event.issue.pull_request && (github.event.comment.body == 'canary-publish' || github.event.comment.body == '/canary-publish')}}
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Get PR branch name
28+
id: get_branch
29+
run: |
30+
PR=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" ${{ github.event.issue.pull_request.url }})
31+
echo "::set-output name=branch::$(echo $PR | jq -r '.head.ref')"
32+
33+
- name: Checkout Repo
34+
uses: actions/checkout@v3
35+
with:
36+
ref: ${{ steps.get_branch.outputs.branch }}
37+
38+
- name: Install Dependencies
39+
run: pnpm install --frozen-lockfile
40+
41+
- name: Canary Publish
42+
uses: NaverPayDev/changeset-actions/canary-publish@main
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }} # 필요하면 user의 PAT을 넣어주세요.
45+
npm_tag: canary # npm 배포 시 달아줄 태그는 무엇으로 할지적어주세요
46+
npm_token: ${{ secrets.NPM_TOKEN }} # npm 배포시 필요한 publish token 을 넣어주세요
47+
publish_script: pnpm run deploy:canary # canary 배포 실행 script 를 넣어주세요
48+
packages_dir: packages # 변경을 탐지할 패키지들의 폴더명을 추가해주세요. (default: packages,share)
49+
excludes: ".turbo,.github" # 변경감지를 제외하고싶은 파일 또는 폴더 경로
50+
```
51+
52+
## 실행 결과
53+
54+
![example](./src/assets/example.png)
55+
![example2](./src/assets/example2.png)
56+
![example3](./src/assets/example3.png)

canary-publish/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# changesets-canary-publish
22

3-
## 설명
3+
## Description
44

5-
- changeset을 이용한 패키지 배포 플로우를 사용할 때, 해당 PR의 변경점을 파악하여 `.changeset` 하위 변경된 패키지들을 Canary 배포할 수 action 입니다.
5+
This action allows Canary deployment of modified packages under the `.changeset` directory when using a package deployment flow based on changesets. It identifies changes in the pull request and deploys the updated packages.
66

7-
## 사용 방법
7+
## Usage
88

9-
- 프로젝트 root의 `.github/workflows` 경로에 아래와 같이 `.yaml` 파일을 작성합니다.
9+
Create a `.yaml` file in the `.github/workflows` directory at the root of your project as shown below:
1010

1111
```yaml
12-
# 기호에 맞게 변경해주세요
12+
# Adjust according to your needs
1313
name: changeset canary publish
1414

1515
on:
@@ -39,17 +39,17 @@ jobs:
3939
run: pnpm install --frozen-lockfile
4040

4141
- name: Canary Publish
42-
uses: NaverPayDev/changeset-actions/actions/canary-publish@main
42+
uses: NaverPayDev/changeset-actions/canary-publish@main
4343
with:
44-
github_token: ${{ secrets.GITHUB_TOKEN }} # 필요하면 user의 PAT을 넣어주세요.
45-
npm_tag: canary # npm 배포 시 달아줄 태그는 무엇으로 할지적어주세요
46-
npm_token: ${{ secrets.NPM_TOKEN }} # npm 배포시 필요한 publish token 을 넣어주세요
47-
publish_script: pnpm run deploy:canary # canary 배포 실행 script 를 넣어주세요
48-
packages_dir: packages # 변경을 탐지할 패키지들의 폴더명을 추가해주세요. (default: packages,share)
49-
excludes: ".turbo,.github" # 변경감지를 제외하고싶은 파일 또는 폴더 경로
44+
github_token: ${{ secrets.GITHUB_TOKEN }} # Add user PAT if necessary
45+
npm_tag: canary # Specify the npm tag to use for deployment
46+
npm_token: ${{ secrets.NPM_TOKEN }} # Provide the token required for npm publishing
47+
publish_script: pnpm run deploy:canary # Script to execute Canary deployment
48+
packages_dir: packages # Directory of packages to detect changes (default: packages,share)
49+
excludes: ".turbo,.github" # Files or directories to exclude from change detection
5050
```
5151
52-
## 실행 결과
52+
## Execution Results
5353
5454
![example](./src/assets/example.png)
5555
![example2](./src/assets/example2.png)

detect-add/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ inputs:
2727
required: false
2828
default: ".github,.changeset"
2929
language:
30-
description: "detect add comment의 언어 설정 (en, kr 중 하나를 설정해주세요.)"
30+
description: "detect add comment의 언어 설정 (en, ko 중 하나를 설정해주세요.)"
3131
required: false
3232
default: "en"

detect-add/dist/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33843,9 +33843,9 @@ function main() {
3384333843
const githubToken = core.getInput('github_token');
3384433844
const octokit = github.getOctokit(githubToken);
3384533845
const language = core.getInput('language') || 'en';
33846-
const isKoreanLanguage = language === 'kr';
33847-
if (!['en', 'kr'].includes(language)) {
33848-
throw new Error(`An unsupported language value has been provided. Please use either \`en\` or \`kr\`. (Current value: ${language})`);
33846+
const isKoreanLanguage = language === 'ko';
33847+
if (!['en', 'ko'].includes(language)) {
33848+
throw new Error(`An unsupported language value has been provided. Please use either \`en\` or \`ko\`. (Current value: ${language})`);
3384933849
}
3385033850
const commonParams = { owner, repo, issue_number: pullNumber };
3385133851
/**

detect-add/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ async function main() {
2525
const octokit = github.getOctokit(githubToken)
2626

2727
const language = core.getInput('language') || 'en'
28-
const isKoreanLanguage = language === 'kr'
28+
const isKoreanLanguage = language === 'ko'
2929

30-
if (!['en', 'kr'].includes(language)) {
30+
if (!['en', 'ko'].includes(language)) {
3131
throw new Error(
32-
`An unsupported language value has been provided. Please use either \`en\` or \`kr\`. (Current value: ${language})`,
32+
`An unsupported language value has been provided. Please use either \`en\` or \`ko\`. (Current value: ${language})`,
3333
)
3434
}
3535

publish/README.ko.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# changesets-publish
2+
3+
## 설명
4+
5+
- changeset을 이용한 패키지 배포 플로우를 사용할 때, 해당 PR의 변경점을 파악하여 `.changeset` 하위에 변경된 패키지들을 배포하는 action 입니다.
6+
- .changeset 하위에 변경사항이 기록된 markdown 있다면 `changeset-release/main` 브랜치를 생성하고 markdown 파일이 없다면 publish 를 수행합니다.
7+
8+
## 사용 방법
9+
10+
- 프로젝트 root의 `.github/workflows` 경로에 아래와 같이 `.yaml` 파일을 작성합니다.
11+
12+
```yaml
13+
# 기호에 맞게 변경해주세요
14+
name: changeset-publish
15+
16+
on:
17+
push:
18+
branches:
19+
- main
20+
21+
concurrency: ${{ github.workflow }}-${{ github.ref }}
22+
23+
jobs:
24+
detectAdd:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v3
28+
with:
29+
ref: ${{ github.head_ref }}
30+
- uses: NaverPayDev/changeset-actions/publish@main
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }} # 필요하면 user의 PAT을 넣어주세요.
33+
npm_token: ${{ secrets.NPM_TOKEN }} # npm 배포시 필요한 publish token 을 넣어주세요
34+
publish_script: pnpm run deploy # 배포 실행 script 를 넣어주세요
35+
git_username: npay-fe-bot # 버전업 pr 생성시 설정할 github username 을 넣어주세요
36+
git_email: [email protected] # 버전업 pr 생성시 설정할 github email 을 넣어주세요
37+
pr_title: 🚀 version changed packages # 버전업 pr 생성시 설정할 pr 타이틀 넣어주세요
38+
commit_message: 📦 bump changed packages version # 버전업 pr 생성시 설정할 commit 메시지를 넣어주세요
39+
create_github_release_tag: true # release tag 생성여부를 넣어주세요
40+
formatting_script: pnpm run markdownlint:fix # 생성되는 md 파일의 formatting이 필요하다면 추가해주세요
41+
```
42+
43+
## 실행 결과
44+
45+
![example](./src/assets/pr.png)
46+
![example](./src/assets/example.png)
47+
![example](./src/assets/example2.png)
48+
![example](./src/assets/example3.png)
49+
![example](./src/assets/example4.png)

publish/README.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# changesets-publish
22

3-
## 설명
3+
## Description
44

5-
- changeset을 이용한 패키지 배포 플로우를 사용할 때, 해당 PR의 변경점을 파악하여 `.changeset` 하위에 변경된 패키지들을 배포하는 action 입니다.
6-
- .changeset 하위에 변경사항이 기록된 markdown 있다면 `changeset-release/main` 브랜치를 생성하고 markdown 파일이 없다면 publish 를 수행합니다.
5+
This action identifies changes in a pull request and deploys modified packages under the `.changeset` directory when using a changeset-based package deployment flow. If there are markdown files recording changes under `.changeset`, it creates a `changeset-release/main` branch. If no markdown files are present, it performs the publish operation.
76

8-
## 사용 방법
7+
## Usage
98

10-
- 프로젝트 root의 `.github/workflows` 경로에 아래와 같이 `.yaml` 파일을 작성합니다.
9+
Create a `.yaml` file in the `.github/workflows` directory at the root of your project as shown below:
1110

1211
```yaml
13-
# 기호에 맞게 변경해주세요
12+
# Adjust according to your needs
1413
name: changeset-publish
1514

1615
on:
@@ -29,18 +28,18 @@ jobs:
2928
ref: ${{ github.head_ref }}
3029
- uses: NaverPayDev/changeset-actions/actions/publish@main
3130
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }} # 필요하면 user의 PAT을 넣어주세요.
33-
npm_token: ${{ secrets.NPM_TOKEN }} # npm 배포시 필요한 publish token 을 넣어주세요
34-
publish_script: pnpm run deploy # 배포 실행 script 를 넣어주세요
35-
git_username: npay-fe-bot # 버전업 pr 생성시 설정할 github username 을 넣어주세요
36-
git_email: [email protected] # 버전업 pr 생성시 설정할 github email 을 넣어주세요
37-
pr_title: 🚀 version changed packages # 버전업 pr 생성시 설정할 pr 타이틀 넣어주세요
38-
commit_message: 📦 bump changed packages version # 버전업 pr 생성시 설정할 commit 메시지를 넣어주세요
39-
create_github_release_tag: true # release tag 생성여부를 넣어주세요
40-
formatting_script: pnpm run markdownlint:fix # 생성되는 md 파일의 formatting이 필요하다면 추가해주세요
31+
github_token: ${{ secrets.GITHUB_TOKEN }} # Add user PAT if necessary
32+
npm_token: ${{ secrets.NPM_TOKEN }} # Token required for npm publishing
33+
publish_script: pnpm run deploy # Script to execute the deployment
34+
git_username: npay-fe-bot # GitHub username for version bump PR creation
35+
git_email: [email protected] # GitHub email for version bump PR creation
36+
pr_title: 🚀 version changed packages # PR title for version bump
37+
commit_message: 📦 bump changed packages version # Commit message for version bump
38+
create_github_release_tag: true # Whether to create a release tag
39+
formatting_script: pnpm run markdownlint:fix # Add if formatting the generated markdown files is required
4140
```
4241
43-
## 실행 결과
42+
## Execution Results
4443
4544
![example](./src/assets/pr.png)
4645
![example](./src/assets/example.png)

0 commit comments

Comments
 (0)