-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.41 KB
/
ci-cd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI/CD
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build-lint-test-release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/bootstrap
- run: pnpm run lint
- run: pnpm run --if-present test
- name: Create Release Pull Request or Publish to npm
if: ${{ github.ref == 'refs/heads/main' }}
uses: changesets/action@v1
with:
publish: pnpm exec changeset publish
commit: "chore: release"
title: "chore: release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
chromatic:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/bootstrap
- uses: chromaui/action@v11
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: build:stories
exitOnceUploaded: true
onlyChanged: true
externals: |
**/*.css
pnpm-lock.yaml
src/tailwind-preset.ts
tailwind.config.ts