Skip to content

Commit

Permalink
build: package build & release & publish workflows
Browse files Browse the repository at this point in the history
fix: supple CDN version installation guide
Release-As: 0.0.1

Signed-off-by: Ricco Xie <ricco@riccox.com>
  • Loading branch information
riccox committed Jan 22, 2023
1 parent 25aa463 commit af76ff5
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: release-please
on:
push:
branches:
- main
jobs:
release-please:
name: Build & Release & Publish
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: "@sira-ui/tailwind"
path: "packages/tailwind"
changelog-path: "/CHANGELOG.md"
pull-request-title-pattern: "chore(release): v${version}"

- name: Echo status of release-please
env:
RELEASES_CREATED: ${{ steps.release.outputs.releases_created }}
RELEASE_CREATED: ${{ steps.release.outputs.release_created }}
run: |
echo "releases_created: $RELEASES_CREATED"
echo "release_created: $RELEASE_CREATED"
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.releases_created }}

- uses: actions/setup-node@v1
if: ${{ steps.release.outputs.releases_created }}
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'

- name: Setup PNPM
if: ${{ steps.release.outputs.releases_created }}
uses: pnpm/action-setup@v2
with:
version: 7.17.1

- name: Install deps
if: ${{ steps.release.outputs.releases_created }}
run: pnpm install

- name: Build
if: ${{ steps.release.outputs.releases_created }}
run: pnpm run build --filter=@sira-ui/tailwind

- name: Publish
if: ${{ steps.release.outputs.releases_created }}
run: pnpm publish --access public --filter=@sira-ui/tailwind
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

<img width="7%" alt="logo" src="https://assets.riccox.com/sira/logo/plain.svg"/>

[![Stars](https://img.shields.io/github/stars/riccox/sira?style=social)](https://github.com/riccox/sira)
[![License](https://img.shields.io/github/license/riccox/sira)](./LICENSE)
[![Vercel](https://img.shields.io/github/deployments/riccox/sira/production?label=Vercel&logo=vercel)](https://sira.riccox.com)
[![Stars](https://img.shields.io/github/stars/riccox/sira?style=social)](https://github.com/riccox/sira)
![GitHub last commit](https://img.shields.io/github/last-commit/riccox/sira)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/riccox/sira)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/riccox/sira/release-please.yml)](https://github.com/riccox/sira/actions/workflows/release-please.yml)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/riccox/sira)](https://github.com/riccox/sira/releases)
[![Vercel](https://img.shields.io/github/deployments/riccox/sira/production?label=WebsiteOnVercel&logo=vercel)](https://sira.riccox.com)

[Sira](https://sira.riccox.com) is an open source, highly customized and accessible design system, which currently
provides TailwindCSS component class name library.
Expand Down Expand Up @@ -40,7 +41,7 @@ npm install @sira-ui/tailwind
## CDN

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sira-ui/tailwind@0.0.1/dist/css/styles.css"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sira-ui/tailwind/dist/css/styles.css"/>
<script src="https://cdn.tailwindcss.com"></script>
```

Expand Down
8 changes: 8 additions & 0 deletions apps/website/pages/docs/guide/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ module.exports = {

If you prefer to use CDN, you can add the following link to your HTML file, but consider you can't remove the unused styles.

```html
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@sira-ui/tailwind/dist/css/styles.css"
/>
<script src="https://cdn.tailwindcss.com"></script>
```

Now you are set to use Sira-UI components in your project.

```html
Expand Down
2 changes: 1 addition & 1 deletion packages/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"files": [
"dist/js",
"dist/css",
"pnpm-lock.json",
"LICENSE",
"README.md"
],
"browserslist": [
Expand Down

1 comment on commit af76ff5

@vercel
Copy link

@vercel vercel bot commented on af76ff5 Jan 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sira – ./

sira-git-main-riccox.vercel.app
sira-riccox.vercel.app
sira.vercel.app
sira.riccox.com

Please sign in to comment.