mirror of
https://github.com/sern-handler/cli
synced 2026-06-06 01:16:53 +00:00
41 lines
932 B
YAML
41 lines
932 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@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3
|
|
with:
|
|
node-version: 17
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install Node.js dependencies
|
|
run: npm i
|
|
|
|
- name: Link Project
|
|
run: npm link
|
|
|
|
- name: Test Sern
|
|
run: sern
|
|
|
|
- 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 }}
|