fix: 修复"Workspaces can only be enabled in private projects"的报错 #10
Workflow file for this run
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: 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: Checkout temp branch if need | |
run: node ./script/checkout-branch.js --branch=${{ github.event.pull_request.head.ref }} | |
- 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 }} | |
- name: Delete temp branch if need | |
run: node ./script/checkout-branch.js -D |