Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ updates:
patterns:
- "storybook"
- "@storybook/*"
- "eslint-plugin-storybook"
react:
patterns:
- "react"
Expand All @@ -26,6 +27,7 @@ updates:
patterns:
- "vite"
- "vitest"
- "@vitest/coverage-v8"

- package-ecosystem: "github-actions"
pull-request-branch-name:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,49 @@
with:
token: ${{ secrets.CODECOV_TOKEN }}
- run: bun run build

install-test:
runs-on: ubuntu-latest
name: "Vite + React"

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies & Build
run: |
bun install
bun run build:lib
- name: Create test project & install daleui
run: |
mkdir /tmp/test-project && cd /tmp/test-project
bun create vite@5 . --template react-ts
bun install
bun add "$GITHUB_WORKSPACE"
- name: Add daleui smoke test
run: |
cd /tmp/test-project
mkdir -p src/smoke
cat > src/smoke/DaleTest.tsx << 'EOF'
import { Button } from 'daleui';
export default function DaleTest() {
return (
<div data-testid="daleui-smoke">
<Button>daleui 성공적으로 로드됨!</Button>
</div>
);
}
EOF
- name: Run production build
run: |
cd /tmp/test-project
bun run build
Comment on lines +24 to +67

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
14 changes: 5 additions & 9 deletions .github/workflows/publication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ jobs:
with:
ref: ${{ github.event.release.tag_name }}

- name: Setup Bun
uses: oven-sh/setup-bun@v2

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

- name: Verify tag matches package.json
run: |
TAG_NAME="${{ github.event.release.tag_name }}"
Expand All @@ -34,16 +28,18 @@ jobs:
fi
echo "✅ 버전 일치 확인: ${TAG_VERSION}"

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Build package
run: |
bun install --frozen-lockfile
bun run prepare
bun run build:lib

- name: Publish to npm
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc

bun publish
echo "npm 배포가 완료되었습니다."
44 changes: 16 additions & 28 deletions .github/workflows/tagging.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,37 @@
name: Tagging 🏷️

on:
pull_request:
types: [closed]
branches: [main]
workflow_dispatch:
inputs:
version:
description: "Version to release (e.g., 1.2.3)"
bump:
description: "Version bump type (patch/minor/major)"
required: true
type: string
type: choice
default: patch
options:
- patch
- minor
- major

jobs:
create-tag:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/'))
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6

- name: Determine version
id: version
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
VERSION="${{ inputs.version }}"
else
VERSION=$(echo "${{ github.event.pull_request.head.ref }}" | sed 's|^release/||')
fi
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid version format: $VERSION"
exit 1
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT

- uses: fregante/setup-git-user@v2

- name: Bump version and push tag
run: |
npm version ${{ steps.version.outputs.version }}
git push --follow-tags
- name: Bump version
run: npm version ${{ inputs.bump }}

- name: Push changes
run: git push --follow-tags

- name: Draft release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create v${{ steps.version.outputs.version }} --draft --generate-notes
run: |
NEW_VERSION="v$(jq -r '.version' package.json)"
gh release create $NEW_VERSION --draft --generate-notes
Loading