Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
feat: add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
khaosdoctor committed Feb 13, 2022
1 parent 1e6d83e commit c3c1fbe
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Lint and Test

on:
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Chekout code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- run: npm ci
- run: npm run lint
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ['lts/*', node]

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

0 comments on commit c3c1fbe

Please sign in to comment.