mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
35 lines
852 B
YAML
35 lines
852 B
YAML
name: Continuous Delivery
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'src/**'
|
|
- 'package.json'
|
|
|
|
jobs:
|
|
Publish:
|
|
name: Publishing Dev
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
|
|
with:
|
|
node-version: 18
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install Node.js dependencies
|
|
run: npm i && npm run build:dev
|
|
|
|
- name: Publish to npm
|
|
run: |
|
|
npm version premajor --preid "dev.$(git rev-parse --verify --short HEAD)" --git-tag-version=false
|
|
npm publish --tag dev
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|