Skip to content
Merged
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
7 changes: 7 additions & 0 deletions .changeset/large-dots-follow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@naverpay/stylelint-config": patch
---

new canary workflow & stylelint-config

PR: [new canary workflow & stylelint-config](https://github.com/NaverPayDev/code-style/pull/111)
43 changes: 43 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Adjust according to your needs
name: Release Canary

on:
issue_comment:
types:
- created

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
canary:
if: ${{ github.event.issue.pull_request && (github.event.comment.body == 'canary-publish' || github.event.comment.body == '/canary-publish')}}
runs-on: ubuntu-latest
steps:
- name: Get PR branch name
id: get_branch
run: |
PR=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" ${{ github.event.issue.pull_request.url }})
echo "::set-output name=branch::$(echo $PR | jq -r '.head.ref')"

- uses: actions/checkout@v4
with:
ref: ${{ steps.get_branch.outputs.branch }}
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Canary Publish
uses: NaverPayDev/changeset-actions/canary-publish@main
with:
github_token: ${{ secrets.ACTION_TOKEN }} # Add user PAT if necessary
npm_tag: canary # Specify the npm tag to use for deployment
npm_token: ${{ secrets.NPM_TOKEN }} # Provide the token required for npm publishing
publish_script: pnpm run release:canary # Script to execute Canary deployment
packages_dir: packages # Directory of packages to detect changes (default: packages,share)
excludes: '.turbo,.github' # Files or directories to exclude from change detection
version_template: '{VERSION}-canary.{DATE}-{COMMITID7}'
27 changes: 14 additions & 13 deletions .github/workflows/changesets-detect-add.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
name: changeset-detect-add
name: detect changed packages

on:
pull_request:
branches:
- '**'
types: [opened, reopened, synchronize, labeled, unlabeled]
branches: ['**']
types: [opened, reopened, labeled, unlabeled, synchronize]

concurrency:
group: detect-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
detect-add:
detect:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
steps:
- name: Checkout
- name: Checkout Repo
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTION_TOKEN }}
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup node
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Detect Changed Packages
- name: 'detect changed packages'
uses: NaverPayDev/changeset-actions/detect-add@main
with:
github_token: ${{ secrets.ACTION_TOKEN }}
packages_dir: packages
skip_label: skip-detect-change
skip_branches: main
formatting_script: pnpm markdownlint:fix
formatting_script: pnpm run markdownlint:fix
50 changes: 50 additions & 0 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Adjust according to your needs
name: Release RC

on:
issue_comment:
types:
- created

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write # to create release

jobs:
canary:
if: ${{ github.event.issue.pull_request && (github.event.comment.body == 'rc-publish' || github.event.comment.body == '/rc-publish')}}
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Get PR branch name
id: get_branch
run: |
PR=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" ${{ github.event.issue.pull_request.url }})
echo "::set-output name=branch::$(echo $PR | jq -r '.head.ref')"

- uses: actions/checkout@v4
with:
ref: ${{ steps.get_branch.outputs.branch }}
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: RC Publish
uses: NaverPayDev/changeset-actions/canary-publish@main
with:
github_token: ${{ secrets.ACTION_TOKEN }} # Add user PAT if necessary
npm_tag: rc # Specify the npm tag to use for deployment
npm_token: ${{ secrets.NPM_TOKEN }} # Provide the token required for npm publishing
publish_script: pnpm run release:canary # Script to execute Canary deployment
packages_dir: packages # Directory of packages to detect changes (default: packages,share)
excludes: '.turbo,.github' # Files or directories to exclude from change detection
version_template: '{VERSION}-rc.{DATE}-{COMMITID7}'
create_release: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: changeset-publish
name: release packages

on:
push:
Expand All @@ -8,35 +8,37 @@ on:
concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
publish:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout Repo
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTION_TOKEN }}
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup node
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- uses: NaverPayDev/changeset-actions/publish@main
- name: Create Release Pull Request
id: changesets
uses: NaverPayDev/changeset-actions/publish@main
with:
github_token: ${{ secrets.ACTION_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}
publish_script: pnpm release
git_username: npay-fe-bot
git_username: npayfebot
git_email: npay.fe.bot@navercorp.com
pr_title: 🚀 version changed packages
commit_message: 📦 bump changed packages version
publish_script: pnpm release
pr_title: '🚀 version changed packages'
commit_message: '📦 bump changed packages version'
create_github_release_tag: true
formatting_script: pnpm markdownlint:fix
formatting_script: pnpm run markdownlint:fix
npm_token: ${{ secrets.NPM_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"postinstall": "lefthook install",
"prettier": "prettier --check '**/*.{json,yaml,yml,md,ts,tsx,js,jsx}'",
"prettier:fix": "prettier --write '**/*.{json,yaml,yml,md,ts,tsx,js,jsx}'",
"release": "pnpm build && changeset publish",
"release:canary": "pnpm build && changeset publish --tag canary",
"release": "pnpm run build && changeset publish --directory dist",
"release:canary": "pnpm run build && changeset publish --no-git-tag --directory dist",
"test": "turbo test",
"test:watch": "turbo test:watch"
},
Expand All @@ -34,11 +34,16 @@
"prettier": "^3.2.5",
"turbo": "^2.3.3",
"typescript": "^5.2.2",
"vite": "^6.2.0"
"vite": "^6.3.5"
},
"packageManager": "pnpm@9.1.3",
"engines": {
"node": ">=20.13.1",
"pnpm": ">=9.1.3"
},
"pnpm": {
"overrides": {
"@changesets/cli>@changesets/assemble-release-plan": "github:NaverPayDev/changesets-assemble-release-plan"
}
}
}
19 changes: 9 additions & 10 deletions packages/stylelint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@
"license": "MIT",
"author": "@NaverPayDev/frontend",
"main": "index.js",
"dependencies": {
"stylelint": "^16.19.1",
"stylelint-order": "^7.0.0",
"stylelint-scss": "^6.12.0"
},
"devDependencies": {
"postcss": "^8.4.8",
"postcss-scss": "^4.0.3",
"stylelint": "^14.2.0",
"stylelint-order": "^5.0.0",
"stylelint-scss": "^4.1.0"
"postcss": "^8.5.3",
"postcss-scss": "^4.0.9"
},
"peerDependencies": {
"postcss": "^8.4.8",
"postcss-scss": "^4.0.3",
"stylelint": "^14.2.0",
"stylelint-order": "^5.0.0",
"stylelint-scss": "^4.1.0"
"postcss": "^8.5.3",
"postcss-scss": "^4.0.9"
}
}
Loading