Skip to content

Commit f3ac478

Browse files
committed
build: add publish workflow
1 parent d21e85f commit f3ac478

File tree

6 files changed

+554
-30
lines changed

6 files changed

+554
-30
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Triggers on version tags like v1.0.0
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: pnpm/action-setup@v3
15+
with:
16+
version: 8
17+
- uses: actions/setup-node@v4
18+
with:
19+
cache: 'pnpm'
20+
registry-url: 'https://registry.npmjs.org/'
21+
- run: pnpm install
22+
- run: pnpm run ci
23+
- run: pnpm run build
24+
- run: pnpm publish
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Ensure you have NPM_TOKEN in your repository secrets

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# dependencies
21
node_modules
3-
4-
# misc
52
.DS_Store
6-
73
coverage
4+
dist
85
.eslintcache

package.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,14 @@
44
"description": "**funcy** provides a simple, strongly typed, and comprehensive toolkit for AWS lambda.",
55
"type": "module",
66
"main": "./dist/index.js",
7-
"module": "./dist/index.mjs",
7+
"module": "./dist/index.js",
88
"types": "./dist/index.d.ts",
9-
"exports": {
10-
".": {
11-
"import": "./dist/index.mjs",
12-
"require": "./dist/index.js",
13-
"types": "./dist/index.d.ts"
14-
}
15-
},
16-
"files": [
17-
"dist"
18-
],
199
"publishConfig": {
2010
"access": "public"
2111
},
2212
"scripts": {
2313
"preinstall": "npx -y only-allow pnpm",
24-
"build": "tsup src/index.ts --format cjs,esm --dts",
14+
"build": "tsup package/index.ts --format cjs,esm --dts",
2515
"test": "vitest run --coverage",
2616
"test:watch": "vitest --ui",
2717
"typecheck": "pnpm run -r typecheck",
@@ -39,6 +29,7 @@
3929
"eslint": "^8.57.0",
4030
"eslint-config-prettier": "^9.1.0",
4131
"prettier": "^3.3.3",
32+
"tsup": "^8.2.4",
4233
"typescript": "^5.5.4",
4334
"typescript-eslint": "^7.18.0",
4435
"vite-tsconfig-paths": "^4.3.2",

package/src/integrations/api/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ export const createApi = <
7474
opts: FuncyApiOptions<TResponse, TRequest, TPath, TQuery, TAuthorizer, TEvent>,
7575
) => {
7676
opts = merge({}, apiOpts, opts)
77-
console.log(opts)
7877

7978
return pipeline<TResponse, TRequest, TPath, TQuery, TAuthorizer>(opts).handler(
8079
(ev, context) => {

0 commit comments

Comments
 (0)