Skip to content

fix: 修复"Workspaces can only be enabled in private projects"的报错 #3

fix: 修复"Workspaces can only be enabled in private projects"的报错

fix: 修复"Workspaces can only be enabled in private projects"的报错 #3

name: Publish Alpha
on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]
jobs:
publish-alpha:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout Branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- name: Install Dependencies
run: npx yarn
- name: Setup git userName
run: git config user.name 'yukilzw'
- name: Setup git userEmail
run: git config user.email 'liuzhanwei@bytedance.com'
- name: Lerna Version alpha
run: npx lerna version prerelease --preid=alpha --yes
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Lerna Publish Alpha
run: npx lerna publish from-package --dist-tag alpha --yes
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}