Skip to content

initial commit

initial commit #1

Workflow file for this run

name: CI
on: [push]
env:
HUSKY: 0
jobs:
build:
if: github.repository == 'seemorg/markdown-parser' && (github.ref == 'refs/heads/master') && github.event_name != 'pull_request'
name: ⚒️ Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16.x', '18.x']
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
- name: Lint
run: yarn lint --quiet
- name: Test
run: yarn test:coverage
- name: Build
run: yarn build
test-and-publish:
name: 🎉 Publish to NPM
needs: [build]
if: github.repository == 'seemorg/markdown-parser' && (github.ref == 'refs/heads/master') && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install deps (with cache)
uses: bahmutov/npm-install@v1
- name: Build
run: yarn build
- run: npx semantic-release@17
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}