Skip to content

Commit

Permalink
ci: add semantic release, commitizen, and husky
Browse files Browse the repository at this point in the history
  • Loading branch information
Aposhian committed Sep 1, 2020
1 parent 2c610c1 commit 7f3e50c
Show file tree
Hide file tree
Showing 5 changed files with 12,216 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: semantic-release

on:
pull_request:
push:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# Run the steps below with the following versions of Node.js
node-version: [8.x, 10.x, 12.x]
steps:
# Fetch the latest commit
- name: Checkout
uses: actions/checkout@v2

# Setup Node.js using the appropriate version
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

# Install package dependencies
- name: Install
run: npm ci

# Run tests
- name: Test
run: npm test

release:
# Only release on push to master
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
# Waits for test jobs for each Node.js version to complete
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install
run: npm ci

- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage/
node_modules/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

# route-param-alias
Express.js middleware to substitute route parameters with values from other parts of the request.
Loading

0 comments on commit 7f3e50c

Please sign in to comment.