Skip to content

chore: 🤖 semantic-release #19

chore: 🤖 semantic-release

chore: 🤖 semantic-release #19

Workflow file for this run

name: Release
on:
push:
branches: [release]
permissions:
contents: write
issues: write
pull-requests: write
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: cache
uses: actions/cache@v4
with:
path: ~/.local/share/pnpm
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: Install
if: steps.cache.outputs.cache-hit != 'true'
run: pnpm i
release:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
with:
path: ~/.local/share/pnpm
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- run: pnpm i && pnpm run build && pnpm i -g typescript
- uses: cycjimmy/semantic-release-action@v4
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
storybook:
needs: release
if: needs.release.outputs.new_release_published == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
with:
path: ~/.local/share/pnpm
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- run: pnpm i && pnpm run build:storybook
- uses: chromaui/action@latest
with:
storybookBuildDir: storybook
projectToken: ${{ secrets.CHROMATIC_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}