build: 修改 yarn CI 配置 #125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build UI | |
on: | |
push: | |
paths: | |
- 'packages/dl-ui/package.json' | |
- '.github/workflows/build-ui.yml' | |
jobs: | |
publish-npm: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.17.0 | |
registry-url: https://registry.npmjs.org/ | |
- run: corepack enable | |
- shell: bash | |
name: Log yarn version | |
run: yarn cache clean --all && yarn -v | |
- name: Install | |
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn | |
- shell: bash | |
name: Copy file | |
run: cp -r README.md ./packages/dl-ui && cp -r .npmignore ./packages/dl-ui && cp -r LICENSE ./packages/dl-ui | |
- name: Build | |
run: yarn build:lib | |
- shell: bash | |
name: List workspace | |
run: cd packages/dl-ui && ls -la | |
- name: Publish | |
run: cd packages/dl-ui && npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |