-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format types, bump version, add automatic deployment
- Loading branch information
1 parent
9019c7f
commit a06f6a8
Showing
3 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Node.js package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
jobs: | ||
build-test-publish: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 6 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16.x' | ||
- run: npm install | ||
- run: npm test | ||
- uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
token: ${{ env.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
interface OnShutdown { | ||
(handler: ()=> Promise<void>): void | ||
(name: string, handler: ()=> Promise<void>): void | ||
(name: string, dependencies: string[], handler: ()=> Promise<void>): void | ||
(handler: () => Promise<void>): void; | ||
(name: string, handler: () => Promise<void>): void; | ||
(name: string, dependencies: string[], handler: () => Promise<void>): void; | ||
} | ||
|
||
export const onShutdown: OnShutdown | ||
export const onShutdown: OnShutdown; | ||
|
||
export function onShutdownError(callback: (error: Error) => Promise<void>): void; | ||
export function onShutdownError( | ||
callback: (error: Error) => Promise<void> | ||
): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters