Fix Docker and CI builds (#773)
* Fix Docker and CI builds * Fix indentation * Fix release --------- Co-authored-by: philon- <philon-@users.noreply.github.com>
This commit is contained in:
co-authored by
philon-
parent
f04ec36faf
commit
2735c37fad
@@ -35,9 +35,8 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-
|
||||
|
||||
# - name: Run tests
|
||||
# working-directory: packages/web
|
||||
# run: deno task test
|
||||
- name: Run tests
|
||||
run: pnpm run test
|
||||
|
||||
- name: Install Dependencies
|
||||
working-directory: packages/web
|
||||
|
||||
@@ -44,6 +44,9 @@ jobs:
|
||||
- name: Check formatter
|
||||
run: pnpm run check
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm run test
|
||||
|
||||
- name: Build Package
|
||||
working-directory: packages/web
|
||||
run: pnpm run build
|
||||
|
||||
@@ -61,26 +61,31 @@ jobs:
|
||||
- name: Publish packages to npm and JSR
|
||||
run: |
|
||||
for dir in packages/*; do
|
||||
echo "Processing $dir"
|
||||
if [ "$dir" != "packages/web" ]; then
|
||||
echo "Processing $dir"
|
||||
|
||||
cd $dir
|
||||
cd $dir
|
||||
|
||||
# Build and publish to npm if package.json exists
|
||||
if [ -f "package.json" ]; then
|
||||
echo "Building and publishing $dir to npm..."
|
||||
pnpm run build:npm
|
||||
pnpm run publish:npm || echo "npm publish failed for $dir"
|
||||
# Build and publish to npm if package.json exists
|
||||
if [ -f "package.json" ]; then
|
||||
echo "Building and publishing $dir to npm..."
|
||||
pnpm install
|
||||
pnpm run build:npm
|
||||
pnpm run publish:npm || echo "npm publish failed for $dir"
|
||||
fi
|
||||
|
||||
pnpm run prepare:jsr
|
||||
|
||||
# Publish to JSR if jsr.json exists
|
||||
if [ -f "jsr.json" ]; then
|
||||
echo "Publishing $dir to jsr..."
|
||||
deno publish || echo "JSR publish failed for $dir"
|
||||
fi
|
||||
|
||||
cd - > /dev/null
|
||||
else
|
||||
echo "Skipping $dir"
|
||||
fi
|
||||
|
||||
pnpm run prepare:jsr
|
||||
|
||||
# Publish to JSR if jsr.json exists
|
||||
if [ -f "jsr.json" ]; then
|
||||
echo "Publishing $dir to jsr..."
|
||||
deno publish || echo "JSR publish failed for $dir"
|
||||
fi
|
||||
|
||||
cd - > /dev/null
|
||||
done
|
||||
|
||||
|
||||
@@ -13,31 +13,36 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
# --- Setup Node.js and pnpm ---
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
bun-version: latest
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Bun Dependencies
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: latest
|
||||
|
||||
# --- Cache pnpm Dependencies ---
|
||||
- name: Cache pnpm Dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.bun/install/cache
|
||||
~/.pnpm-store
|
||||
packages/web/node_modules
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-bun-
|
||||
${{ runner.os }}-pnpm-
|
||||
|
||||
- name: Run Web App Tests
|
||||
- name: Install dependencies
|
||||
working-directory: packages/web
|
||||
run: bun run test
|
||||
run: pnpm install
|
||||
|
||||
- name: Create Web App Release Archive
|
||||
working-directory: packages/web
|
||||
run: bun run package
|
||||
run: pnpm run package
|
||||
|
||||
- name: Upload Web App Archive
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -59,7 +64,7 @@ jobs:
|
||||
uses: redhat-actions/buildah-build@v2
|
||||
with:
|
||||
containerfiles: |
|
||||
./infra/Containerfile
|
||||
./packages/web/infra/Containerfile
|
||||
image: ghcr.io/${{ github.repository }}
|
||||
tags: latest, ${{ github.event.release.tag_name }}
|
||||
oci: true
|
||||
|
||||
Reference in New Issue
Block a user