Skip to content

Changes to system built on pandacss #205

Changes to system built on pandacss

Changes to system built on pandacss #205

Workflow file for this run

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:
NODE_VERSION: 16
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- args: [--global, gulp, prettier, typescript]
- name: Run build
run: |
pnpm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-output
path: dist
retention-days: 1
static-analysis:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: |
npm install
- name: Run prettier
run: |
npm run format:check
- name: Run lint
run: |
npm run lint
- name: Danger
if: github.event_name == 'pull_request'
run: npm run danger:pr -- ci
env:
PR: ${{ github.event.number }}
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
unit-test-scan:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout Commit
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: |
npm install
- name: Run tests
run: |
npm run test
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_TOKEN }}
build-example:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-output
path: dist
- name: Install Dependencies
run: |
npm install
- name: Check example
run: |
npm run build
working-directory: ./example
build-storybook:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: |
npm install
- name: Build Storybook
run: npm run build-storybook --quiet
release:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta'
runs-on: ubuntu-latest
needs: [static-analysis, unit-test-scan, build-example]
steps:
- name: Checkout Commit
uses: actions/checkout@v3
with:
token: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: |
npm install
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-output
path: dist
- name: Release
env:
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: commitd-bot
GIT_AUTHOR_EMAIL: 56758001+committed-bot@users.noreply.github.com
GIT_COMMITTER_NAME: commitd-bot
GIT_COMMITTER_EMAIL: 56758001+commitd-bot@users.noreply.github.com
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
publish-storybook:
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: |
npm install
- name: Publish Storybook
if: github.ref == 'refs/heads/main'
run: npm run deploy-storybook -- --ci
env:
GH_TOKEN: commitd-bot:${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}