Updates to ci #221
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: ci | |
on: | |
push: | |
branches: | |
- main | |
- beta | |
pull_request: | |
types: [opened, synchronize, reopened] | |
concurrency: | |
group: ${{ github.ref }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
env: | |
CI: true | |
NODE_VERSION: 16 | |
PNPM_CACHE_FOLDER: .pnpm-store | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Commit | |
uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: | | |
- recursive: true | |
args: [--frozen-lockfile, --strict-peer-dependencies] | |
- args: [--global, prettier, typescript, rimraf, turbo] | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
cache: 'pnpm' | |
registry-url: 'https://registry.npmjs.org' | |
node-version: ${{ env.NODE_VERSION }} | |
- name: setup pnpm config | |
run: pnpm config set store-dir $PNPM_CACHE_FOLDER | |
- name: Run build | |
run: | | |
pnpm run ci | |
- name: create and publish versions | |
uses: changesets/action@v1 | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' | |
with: | |
version: pnpm ci:version | |
commit: 'chore: update versions' | |
title: 'chore: update versions' | |
publish: pnpm ci:publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish Storybook | |
if: github.ref == 'refs/heads/beta' | |
run: pnpm -f storybook run deploy-storybook -- --ci | |
env: | |
GH_TOKEN: commitd-bot:${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} |