fix: useDevModules export #17
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: Deploy Next | |
on: | |
# release: | |
# types: [published] | |
push: # push 到 next 分支自动发布 | |
branches: ['next'] | |
paths-ignore: # 忽略一些不必要的文件 | |
- '.gitignore' | |
- 'README.md' | |
- '.vscode/**' | |
- '.devcontainer/**' | |
permissions: | |
contents: write | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
environment: | |
name: 'production' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16.14' | |
- name: Cache Dependencies | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
node_modules | |
.yarn/cache | |
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: yarn install --mode=skip-build | |
- name: Configure Git User | |
run: | | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
git config --global user.name "${{github.actor}}" | |
git config --list | |
- name: Authenticate with Registry | |
run: | | |
echo "registry=https://registry.npmjs.org/" >> .npmrc | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc | |
npm whoami | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish | |
run: | | |
npx lerna publish --yes --canary major --dist-tag next | |
env: | |
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} |