mirror of
https://github.com/cdloh/obsidian-cron.git
synced 2026-07-22 07:40:30 +00:00
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
|
|
name: CI/CD
|
|
|
|
on: [push, workflow_dispatch]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [18.x]
|
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js ${{ matrix.node }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
- run: npm ci
|
|
- run: npm run lint
|
|
- run: npm run build
|
|
|
|
deploy:
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [18.x]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js ${{ matrix.node }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18.x
|
|
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: npm run lint
|
|
- run: npm run semantic-release
|
|
env:
|
|
GH_TOKEN: "${{ secrets.GH_TOKEN }}"
|