build: 版本更新 #165
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 Common | |
on: | |
push: | |
paths: | |
- 'packages/dl-common/package.json' | |
- '.github/workflows/build-common.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 -v | |
- name: Install | |
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn | |
- shell: bash | |
name: Copy file | |
run: cp -r README.md ./packages/dl-common && cp -r .npmignore ./packages/dl-common && cp -r LICENSE ./packages/dl-common | |
- name: Build | |
run: yarn build:common | |
- shell: bash | |
name: List workspace | |
run: cd packages/dl-common && ls -la | |
- name: Publish | |
run: cd packages/dl-common && npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |