refactor: update ci/cd scripts, switch to pnpm (#763)

* refactor: update ci/cd scripts, switch to pnpm

* updated workflow

* add new packages github action. Bump package.json version (#762)

* Update packages/transport-deno/scripts/build_npm.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/core/package.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/transport-deno/scripts/build_npm.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/transport-deno/scripts/build_npm.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/transport-deno/scripts/build_npm.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/release-packages.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* revert copilot suggestion

* adding lock file

* regenerate lock file

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Dan Ditomaso
2025-08-08 14:54:20 -04:00
committed by GitHub
co-authored by Copilot
parent 5a66153dfc
commit 284ccd43f8
37 changed files with 10871 additions and 7583 deletions
+29 -26
View File
@@ -3,9 +3,10 @@ name: Release Packages
on:
workflow_dispatch:
inputs:
tag:
description: 'Release version (e.g. v1.2.3)'
required: true
packages:
description: 'Packages to release (comma-separated, or "all" for all packages)'
required: false
default: 'all'
jobs:
release:
@@ -14,11 +15,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
# --- Setup Bun ---
- 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: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
# --- Setup Deno ---
- name: Setup Deno
@@ -26,16 +32,16 @@ jobs:
with:
deno-version: v2.x
# --- Cache Bun Dependencies ---
- name: Cache Bun Dependencies
# --- 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-
# --- Cache Deno Dependencies ---
- name: Cache Deno Dependencies
@@ -46,14 +52,11 @@ jobs:
restore-keys: |
${{ runner.os }}-deno-
- name: Setup Node for npm publish
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org/'
- name: Configure pnpm registry
run: pnpm config set registry https://registry.npmjs.org/
- name: Configure npm auth
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
- name: Configure pnpm auth
run: pnpm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
- name: Publish packages to npm and JSR
run: |
@@ -62,12 +65,15 @@ jobs:
cd $dir
# Publish to npm if package.json exists
# Build and publish to npm if package.json exists
if [ -f "package.json" ]; then
echo "Publishing $dir to npm..."
npm publish --access public || echo "npm publish failed for $dir"
echo "Building and publishing $dir to npm..."
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..."
@@ -77,7 +83,4 @@ jobs:
cd - > /dev/null
done
- name: Tag release
run: |
git tag ${{ github.event.inputs.tag }}
git push origin ${{ github.event.inputs.tag }}