Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#531 #533

Closed
wants to merge 10 commits into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
78 changes: 78 additions & 0 deletions .github/workflows/design-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: publish
on:
pull_request:
branches:
- fe-dev
types: [closed]

permissions:
contents: write # for checkout and tag
pull-requests: write # for comments
packages: write # for publish

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.15.1'

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd client
npm install

- name: Set Current Version
run: |
CURRENT_VERSION=$(node -p 'require("./client/lerna.json").version')
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV

- name: Create Release
id: create_release
if: github.event.pull_request.merged == true
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.CURRENT_VERSION }}
release_name: ${{ github.event.pull_request.title }}
body: |
${{ github.event.pull_request.body }}
draft: false
prerelease: false

- name: Publish
run: |
cd client
npm run publish from-package --yes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/github-script@v4
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'https://github.com/${{ github.repository }}/releases/tag/v${{ env.CURRENT_VERSION }} is released 🎉'
})
8 changes: 4 additions & 4 deletions .github/workflows/design-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- fe-dev
paths:
- 'HDesign/**'
- './client/package/haengdong-design/**'

jobs:
chromatic:
Expand Down Expand Up @@ -34,18 +34,18 @@ jobs:
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd HDesign
cd client
npm install

- name: Run lint
run: npm run lint
working-directory: ./HDesign
working-directory: ./client

- name: Run Chromatic
uses: chromaui/action@latest
id: publish_chromatic
with:
workingDir: HDesign
workingDir: client/package/haengdong-design
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

- name: Comment on PR
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/frontend-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [opened, synchronize]
branches: [main, fe-dev]
paths:
- 'client/**'
- './client/package/haengdong-client/**'

jobs:
test:
Expand All @@ -14,7 +14,7 @@ jobs:
defaults:
run:
shell: bash
working-directory: ./client
working-directory: ./client/package/haengdong-client

steps:
- name: Checkout code
Expand All @@ -38,7 +38,8 @@ jobs:
run: npm run test

- name: Cypress test
run: npm run dev &
working-directory: ./client/packages/haengdong-client
run: npm run dev
env:
CI: true

Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

Loading
Loading