This repository was archived by the owner on Jul 19, 2025. It is now read-only.
cho 8000 re(release): 0.10.119 #1387
This file contains hidden or 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 | |
on: | |
push: | |
branches: | |
- main | |
- next | |
pull_request_target: | |
types: [closed] | |
jobs: | |
publish: | |
name: Version and publish | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Get node.js cache directory | |
id: node-cache-dir | |
run: echo "::set-output name=dir::$(npm config get cache)" | |
- name: Cache npm dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.node-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Run build | |
run: | | |
npm run build | |
touch apps/website/dist/.nojekyll | |
- name: Version and publish | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor }}@users.noreply.github.com" | |
if [ ${{ github.base_ref }} = next ]; then | |
npx lerna version --conventional-commits --conventional-prerelease --preid beta --yes | |
else | |
npx lerna version --conventional-commits --conventional-graduate --yes | |
fi | |
npx lerna publish from-git --yes | |
1D7B | - name: Deploy website |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.GH_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: apps/website/dist |