Skip to content

Commit

Permalink
💚 Reorganize workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
siguici committed Aug 12, 2024
1 parent 180c477 commit 29776d7
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 17 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build

on:
push:
branches:
- main

workflow_run:
workflows: [CI]
types: [completed]
branches: [main]

defaults:
run:
working-directory: ./packages/ui

permissions:
contents: read

jobs:
build:
runs-on: ${{ matrix.os }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
continue-on-error: false
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
node: [20.16]
pnpm: [9.7.0]
name: 📦️ Build Node-${{ matrix.node }} on ${{ matrix.os }}

steps:
- name: 🚚 Checkout
uses: actions/checkout@v4

- name: ✨ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: 🔧 Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm }}

- name: 🔨 Install JavaScript dependencies
run: pnpm install

- name: ✅ Fix code style and build for production
run: pnpm build

- name: 📂 Upload Deno distribution files
uses: actions/upload-artifact@v4
with:
name: deno_dist
path: packages/ui/jsr
overwrite: true
9 changes: 0 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ jobs:
with:
version: ${{ matrix.pnpm }}

- name: Install JavaScript dependencies
run: pnpm install

- name: ✅ Fix code style and build for production
run: make build

Expand All @@ -74,9 +71,3 @@ jobs:
- name: 🧪 Test features
run: make test

- name: 📦️ Upload Deno distribution files
uses: actions/upload-artifact@v4
with:
name: deno_dist
path: packages/ui/jsr
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

workflow_run:
workflows: [CI, Publish]
workflows: [CI]
types: [completed]
branches: [main]

Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- name: 🚚 Checkout the repository
uses: actions/checkout@v4

- name: 📚 Install, build, and upload website
- name: 🔨 Install, build, and upload website
uses: withastro/action@v2
with:
path: ./website
Expand All @@ -58,6 +58,6 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: 📂 Deploy to GitHub Pages
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

workflow_run:
workflows: [CI]
workflows: [Build]
types: [completed]
branches: [main]

Expand All @@ -32,18 +32,18 @@ jobs:
operating-system: [ubuntu-latest]
deno-version: [1.45]

name: 🚀 Deploy UI to JSR using Deno ${{ matrix.deno-version }}
name: 🎉 Publish to JSR using Deno ${{ matrix.deno-version }}

steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4

- name: 🔨 Configure Deno
- name: 🔧 Configure Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}

- name: 📦️ Download Deno distribution files
- name: 📂 Download Deno distribution files
uses: actions/download-artifact@v4
with:
name: deno_dist
Expand All @@ -54,5 +54,5 @@ jobs:
- name: 🚨 Fix code style
run: deno task fix

- name: 🚀 Publish to JSR
- name: 🎉 Publish to JSR
run: deno publish

0 comments on commit 29776d7

Please sign in to comment.