mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
23 lines
680 B
YAML
23 lines
680 B
YAML
name: NPM / Publish
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
# We only publish if the version of sern handler is different. workflow automatically cancels if verson is the same
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
jobs:
|
|
test-and-publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
|
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
|
with:
|
|
node-version: 18
|
|
- run: npm i
|
|
- run: npm run build:prod
|
|
- uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939 # v1
|
|
with:
|
|
token: ${{ secrets.NPM_TOKEN }}
|
|
access: "public"
|