Skip to content

Commit

Permalink
Fix build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
brombal committed Jan 19, 2024
1 parent ebd6fda commit 120fb12
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 159 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run Docker test containers
run: |
docker compose up mysql pg -d
Expand All @@ -24,7 +21,15 @@ jobs:
- name: Run Tests
run: npm test

- name: Publish
run: npm run publish-all
- name: Build & publish core
run: |
npm run build --workspace=core
npm publish --workspace=core
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install core to drivers, build & publish
run: |
npm install @sqltags/core@latest --workspace=drivers
npm run build --workspace=drivers
npm publish --workspace=drivers
10 changes: 7 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run Docker test containers
run: |
docker compose up mysql pg -d
Expand All @@ -28,3 +25,10 @@ jobs:
uses: coverallsapp/github-action@v2
with:
path-to-lcov: ./coverage/lcov.info

- name: Build
run: |
npm install @sqltags/core@latest --workspace=drivers
npm run build --workspaces
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 4 additions & 11 deletions core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sqltags/core",
"version": "0.0.20",
"version": "0.0.21",
"description": "Safely create & execute parameterized SQL queries using template strings 🔧✨ minimal API and works with any db driver (pg, mysql, sqlite, etc).",
"license": "MIT",
"author": {
Expand Down Expand Up @@ -33,14 +33,7 @@
"node": ">=16.5"
},
"source": "./index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
}
}
"type": "module",
"main": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
16 changes: 4 additions & 12 deletions drivers/mysql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sqltags/mysql",
"version": "0.0.20",
"version": "0.0.21",
"description": "MySQL driver for sqltags (@sqltags/core) 🔧✨ Safely create & execute parameterized SQL queries using template strings",
"license": "MIT",
"author": {
Expand Down Expand Up @@ -28,22 +28,14 @@
"engines": {
"node": ">=16.5"
},
"type": "module",
"source": "./mysql.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"main": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"scripts": {
"build": "rm -rf dist && parcel build --no-cache"
},
"dependencies": {
"mysql2": "^3.7.0",
"@sqltags/core": "0.0.18"
"mysql2": "^3.7.0"
}
}
14 changes: 3 additions & 11 deletions drivers/postgres/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sqltags/pg",
"version": "0.0.20",
"version": "0.0.21",
"description": "PostgreSQL driver for SqlTags (@sqltags/core) 🔧✨ Safely create & execute parameterized SQL queries using template strings",
"license": "MIT",
"author": {
Expand Down Expand Up @@ -28,22 +28,14 @@
"engines": {
"node": ">=16.5"
},
"type": "module",
"source": "./postgres.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"main": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"scripts": {
"build": "rm -rf dist && parcel build --no-cache"
},
"dependencies": {
"@sqltags/core": "0.0.18",
"pg": "^8.11.3",
"pg-cursor": "^2.10.3"
},
Expand Down
7 changes: 3 additions & 4 deletions drivers/sqlite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sqltags/sqlite",
"version": "0.0.20",
"version": "0.0.21",
"description": "SQLite driver for sqltags (@sqltags/core) 🔧✨ Safely create & execute parameterized SQL queries using template strings",
"license": "MIT",
"author": {
Expand Down Expand Up @@ -28,15 +28,14 @@
"engines": {
"node": ">=16.5"
},
"type": "module",
"source": "./sqlite.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"main": "dist/index.mjs",
"types": "dist/index.d.ts",
"scripts": {
"build": "rm -rf dist && parcel build --no-cache"
},
"dependencies": {
"@sqltags/core": "0.0.18",
"sqlite3": "^5.1.7"
}
}

0 comments on commit 120fb12

Please sign in to comment.