Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify dark mode #21

Closed
wants to merge 11 commits into from
Closed
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
25 changes: 25 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pre Release library
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!main' # excludes main

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
23 changes: 11 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,27 @@ permissions:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install NPM dependencies
run: npm ci

- name: Build library and storybook
run: npm run build && npm run build-storybook
steps:
- uses: actions/checkout@v4
- uses: actions/configure-pages@v2
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build && npm run build-storybook

- name: Setup pages.
uses: actions/configure-pages@v2
- name: Upload artifact.
uses: actions/upload-pages-artifact@v1
with:
path: ./storybook-static/

- name: Publish storybook build to github pages
id: deployment
uses: actions/deploy-pages@v1

- name: Publish library to github packages and npm
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
10 changes: 0 additions & 10 deletions .releaserc

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ npm run build # Build component library with rollup.
```

### Design Tokens
CSS variables are declared in `src/tokens.css`. Dark mode is toggled by the presence of the class `.theme-mode-dark` on the root document element (`<html />`).
CSS variables are declared in `src/tokens.css`. Dark mode is enabled by the presence of the attribute `data-theme` higher up in the tree.



Expand Down
Loading
Loading