Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
name: CI (dev)
name: Deploy Storybook (dev)

on:
push:
branches: [dev]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages-dev
cancel-in-progress: true

jobs:
checks:
deploy-storybook:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -17,14 +26,23 @@ jobs:
node-version: '22.x'
cache: 'npm'

- name: Install
- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
- name: Build Storybook for GitHub Pages
run: npm run build-storybook:gh-pages

- name: Add .nojekyll
run: touch storybook-static/.nojekyll

- name: Typecheck
run: npm run lint:ts
- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: storybook-static

- name: Build
run: npm run build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
116 changes: 0 additions & 116 deletions .github/workflows/deploy-storybook.yml

This file was deleted.

18 changes: 3 additions & 15 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
name: PR Checks (to main)
name: PR Checks

on:
pull_request:
branches: [main]

jobs:
pr-checks:
checks:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
actions: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'

- name: Install
- name: Install dependencies
run: npm ci

- name: Lint
Expand All @@ -38,8 +31,3 @@ jobs:

- name: Build Storybook
run: npm run build-storybook

- name: Upload Storybook artifact
uses: actions/upload-pages-artifact@v3
with:
path: storybook-static
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release to NPM

on:
push:
tags:
- 'v*'
workflow_dispatch:

permissions:
contents: write
id-token: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Build package
run: npm run build

- name: Publish to NPM (Trusted Publisher)
run: npm publish --provenance --access public

- name: Extract CHANGELOG for this version
id: changelog
run: |
VERSION=${GITHUB_REF_NAME#v}
CHANGELOG=$(awk -v ver="$VERSION" '
/^## \[/ { if (p) exit; if ($0 ~ ver) p=1; next }
p { print }
' CHANGELOG.md)
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
Empty file removed .husky/pre-commit
Empty file.
30 changes: 0 additions & 30 deletions .husky/pre-push

This file was deleted.

Loading
Loading