Skip to content

chore: update libraries #15

chore: update libraries

chore: update libraries #15

Workflow file for this run

name: publish
on:
pull_request:
types: [closed]
branches:
- develop
- master
jobs:
lerna:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup node
uses: actions/setup-node@v4
with:
node-version: '18'
- uses: pnpm/action-setup@v3
name: install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: install and prepare
run: pnpm i
- name: setup npm
run: |
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
- name: version and publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
if [ ${{ github.base_ref }} = master ]; then
npx --yes lerna version --no-private --ignore-scripts --exact --conventional-commits --conventional-graduate --create-release github --yes
npx --yes lerna publish from-git --ignore-scripts --yes
else
npx --yes lerna version --no-private --ignore-scripts --exact --conventional-commits --conventional-prerelease --preid beta --create-release github --yes
npx --yes lerna publish from-git --ignore-scripts --dist-tag beta --yes
fi
docs:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup node
uses: actions/setup-node@v4
with:
node-version: '18'
- uses: pnpm/action-setup@v3
name: install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: install deps
run: pnpm i
- name: build docs
run: pnpm build:storybook
- name: upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './sbdocs'
deploy:
needs: docs
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: deploy pages
uses: actions/deploy-pages@v4