Skip to content

Commit

Permalink
Merge pull request #1 from cloudmix-dev/build/add-build-pipeline
Browse files Browse the repository at this point in the history
Add publish and storybook Github actions
  • Loading branch information
samlaycock authored Dec 29, 2023
2 parents 9cc6d0b + 0a04f24 commit 75751ef
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 15 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish

run-name: Publishing new version (via ${{ github.actor }}) 🚀

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
publish:
runs-on: ubuntu-latest
steps:
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "This job was triggered by ${{ github.actor }} on ${{ github.ref }}."
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x
cache: pnpm
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Create PR or publish
uses: changesets/action@v1
with:
publish: pnpm publish --access public
commit: "chore: publish"
title: Publish new version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/storybook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Storybook

run-name: Publishing new Storybook build (via ${{ github.actor }}) 📖

on:
push:
branches:
- main
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
publish:
runs-on: ubuntu-latest
steps:
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "This job was triggered by ${{ github.actor }} on ${{ github.ref }}."
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x
cache: pnpm
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Publish Storybook
uses: cloudflare/wrangler-action@v3
with:
workingDirectory: "www/storybook"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "ui",
"private": true,
"scripts": {
"publish": "pnpm publish -r",
"postinstall": "npx husky install"
},
"keywords": [],
Expand Down
12 changes: 5 additions & 7 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"name": "@cloudmix-dev/react",
"version": "0.0.10",
"files": [
"dist"
],
"main": "./dist/index.cjs.js",
"module": "./dist/index.es.mjs",
"types": "./dist/index.d.ts",
Expand All @@ -19,11 +16,12 @@
}
}
},
"files": ["dist"],
"sideEffects": false,
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"prepare": "npm run build"
"build": "vite build",
"prepare": "npm run build",
"tsc": "tsc"
},
"dependencies": {
"@heroicons/react": "~2.1.1",
Expand Down
12 changes: 5 additions & 7 deletions packages/tailwind/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"name": "@cloudmix-dev/tailwind",
"version": "0.0.10",
"files": [
"dist"
],
"main": "./dist/index.cjs.js",
"module": "./dist/index.es.mjs",
"types": "./dist/index.d.ts",
Expand All @@ -19,11 +16,12 @@
}
}
},
"files": ["dist"],
"sideEffects": false,
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"prepare": "npm run build"
"build": "vite build",
"prepare": "npm run build",
"tsc": "tsc"
},
"dependencies": {
"@tailwindcss/container-queries": "~0.1.1",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"isolatedModules": true,
"incremental": true,
"noUncheckedIndexedAccess": true,
"baseUrl": "."
"baseUrl": ".",
"noEmit": true
}
}

0 comments on commit 75751ef

Please sign in to comment.