Skip to content

Commit

Permalink
build: add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
refactorthis committed Aug 22, 2024
1 parent d21e85f commit f3ac478
Show file tree
Hide file tree
Showing 6 changed files with 554 additions and 30 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish Package

on:
push:
tags:
- 'v*' # Triggers on version tags like v1.0.0

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org/'
- run: pnpm install
- run: pnpm run ci
- run: pnpm run build
- run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Ensure you have NPM_TOKEN in your repository secrets
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# dependencies
node_modules

# misc
.DS_Store

coverage
dist
.eslintcache
15 changes: 3 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,14 @@
"description": "**funcy** provides a simple, strongly typed, and comprehensive toolkit for AWS lambda.",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"preinstall": "npx -y only-allow pnpm",
"build": "tsup src/index.ts --format cjs,esm --dts",
"build": "tsup package/index.ts --format cjs,esm --dts",
"test": "vitest run --coverage",
"test:watch": "vitest --ui",
"typecheck": "pnpm run -r typecheck",
Expand All @@ -39,6 +29,7 @@
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.3.3",
"tsup": "^8.2.4",
"typescript": "^5.5.4",
"typescript-eslint": "^7.18.0",
"vite-tsconfig-paths": "^4.3.2",
Expand Down
1 change: 0 additions & 1 deletion package/src/integrations/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export const createApi = <
opts: FuncyApiOptions<TResponse, TRequest, TPath, TQuery, TAuthorizer, TEvent>,
) => {
opts = merge({}, apiOpts, opts)
console.log(opts)

return pipeline<TResponse, TRequest, TPath, TQuery, TAuthorizer>(opts).handler(
(ev, context) => {
Expand Down
Loading

0 comments on commit f3ac478

Please sign in to comment.