Skip to content

Commit

Permalink
release: v1.3.4 Update structure for monorepo #82
Browse files Browse the repository at this point in the history
v1.3.4: Monorepo 지원 및 전반적인 재조정
  • Loading branch information
orioncactus authored Jul 3, 2022
2 parents fbd6002 + acd7391 commit 072550f
Show file tree
Hide file tree
Showing 4,171 changed files with 44,055 additions and 5,391 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
32 changes: 21 additions & 11 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: volta-cli/action@v1
- name: pip cache
id: pip-cache
uses: actions/cache@v2
Expand All @@ -26,24 +25,35 @@ jobs:
id: node-cache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: |
.yarn/cache
**/tsconfig.tsbuildinfo
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- run: pip install -r ./requirements.txt
- name: npm install
if: steps.node-cache.outputs.cache-hit != 'true'
run: npm install
- run: npm ci --no-audit
- run: yarn install --immutable
- name: Build Dependency
run: |
yarn workspaces foreach -pt run build
- name: Generate webfonts
run: ./subset.sh
run: |
yarn workspaces foreach -pt run subset
- name: Update example assets
run: |
cp -f ./dist/public/static/Pretendard-*.otf ./examples/flutter_pretendard/fonts
cp -f ./dist/public/static/Pretendard-*.otf ./examples/react_native_pretendard/assets/fonts
cp -f ./packages/pretendard/dist/public/static/Pretendard-*.otf ./examples/flutter_pretendard/fonts
cp -f ./packages/pretendard/dist/public/static/Pretendard-*.otf ./examples/react_native_pretendard/assets/fonts
- name: Commit Build File
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
file_pattern: dist/web/** examples/**
file_pattern: packages/*/dist/web/** examples/**
commit_message: 'fix: Auto-generate assets'
- name: Update dist stylesheets
run: ./distCSS.sh
- name: Commit updated dist stylesheets
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
file_pattern: dist/*
commit_message: 'fix: Update dist stylesheets'
37 changes: 26 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,47 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: node cache
id: node-cache
uses: actions/cache@v2
with:
path: |
.yarn/cache
**/tsconfig.tsbuildinfo
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- run: yarn install --immutable
- name: Set env
run: |
RELEASE_VERSION=${GITHUB_REF#refs/*/}
echo "RELEASE_NAME=${RELEASE_VERSION:1}" >> $GITHUB_ENV
- name: Publish to NPM
run: |
# Publish
yarn config set npmAuthToken ${{ secrets.NPM_TOKEN }}
yarn workspaces foreach run publish
- name: Zip
run: |
cd dist
cd packages
# Remove Dynamic Subset Files
rm -rf ./web/static/woff-dynamic-subset
rm -rf ./web/static/woff2-dynamic-subset
rm -f ./web/static/pretendard*dynamic-subset.css
rm -f ./web/static/Pretendard*.css
find -wholename "**/web/static/*dynamic-subset*" -delete
find -wholename "**/web/static/Pretendard*.css" -delete
# Zip
find . -iname "pretendard*" -not -iname "*jp*" -not -iname "*std*" -o -name "LICENSE.txt" | zip -rv Pretendard-${{ env.RELEASE_NAME }}.zip -@
find . -iname "pretendard*" -iname "*jp*" -o -name "LICENSE.txt" | zip -rv PretendardJP-${{ env.RELEASE_NAME }}.zip -@
find . -iname "pretendard*" -iname "*std*" -o -name "LICENSE.txt" | zip -rv PretendardStd-${{ env.RELEASE_NAME }}.zip -@
(cd pretendard/dist && zip -rv - .) > Pretendard-${{ env.RELEASE_NAME }}.zip
(cd pretendard-jp/dist && zip -rv - .) > PretendardJP-${{ env.RELEASE_NAME }}.zip
(cd pretendard-std/dist && zip -rv - .) > PretendardStd-${{ env.RELEASE_NAME }}.zip
- uses: softprops/action-gh-release@v1 # actions/create-release, actions/upload-release-asset is deprecated
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
dist/Pretendard-${{ env.RELEASE_NAME }}.zip
dist/PretendardJP-${{ env.RELEASE_NAME }}.zip
dist/PretendardStd-${{ env.RELEASE_NAME }}.zip
packages/Pretendard-${{ env.RELEASE_NAME }}.zip
packages/PretendardJP-${{ env.RELEASE_NAME }}.zip
packages/PretendardStd-${{ env.RELEASE_NAME }}.zip
cache-invalidation:
needs: upload
Expand All @@ -46,3 +60,4 @@ jobs:
- name: Purge jsDelivr cache
run: |
curl https://purge.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static
curl https://purge.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,21 @@ buck-out/

# CocoaPods
/ios/Pods/

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Zero install
# .pnp.* # If zero install
# !.yarn/cache

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo
9 changes: 9 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

786 changes: 786 additions & 0 deletions .yarn/releases/yarn-3.2.1.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarn/sdks/integrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!

integrations:
- vscode
9 changes: 9 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
nodeLinker: pnpm

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.2.1.cjs
Loading

0 comments on commit 072550f

Please sign in to comment.