Skip to content

Release

Release #21

Workflow file for this run

name: Release
on: workflow_dispatch
jobs:
publish:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install dependencies
run: yarn install
- name: Create .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
- name: Set git username
run: git config user.name "github-actions"
- name: Fetch tags
run: git fetch --prune --unshallow
- name: Install lerna
run: yarn global add [email protected] --prefix /home/runner/.yarn
- name: Bootstrap packages
run: /home/runner/.yarn/bin/lerna bootstrap
- name: Release packages
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: yarn release
deploy-storybook:
name: Deploy storybook
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install dependencies
run: yarn install
- name: Bootstrap packages
run: ./node_modules/.bin/lerna bootstrap
- name: Build storybook
run: NODE_OPTIONS=--openssl-legacy-provider yarn build-storybook
- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build
CLEAN: true