Skip to content

Commit

Permalink
Update split.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
CMBill authored Jan 21, 2025
1 parent 649b22d commit 88df738
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/split.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- uses: actions/[email protected]
with:
node-version: '>=18.0.0'
registry-url: https://registry.npmjs.org

- name: Download fonts
id: down
Expand All @@ -25,7 +26,7 @@ jobs:

- name: Split fonts
run: |
npm install cn-font-split -g
npm install cn-font-split@6 -g
rm -rf ./fonts/
rm -rf ./style.css
rm -rf ./VERSION
Expand Down Expand Up @@ -81,3 +82,18 @@ jobs:
tags: true
directory: fonts
branch: latest

- name: Edit package.json And Publish
run: |
git checkout main -- package.json
mv package.json fonts/package.json
cd fonts
VER=$(cat VERSION)
NORMALIZED_VERSION=$(echo $VER | sed 's/^v//' | awk -F. '{if($3==null) print$1"."$2".0"; else print$0}')
npm version $NORMALIZED_VERSION --no-git-tag-version
- run: |
cd fonts
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 comments on commit 88df738

Please sign in to comment.