chore(deps): update commitlint monorepo to v19 (major) #133
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Release | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@master | |
with: | |
node-version: 10.x | |
- name: Yarn cache directory | |
id: yarn-cache-dir | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Yarn cache | |
uses: actions/cache@v1 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn install --pure-lockfile | |
- name: Test | |
run: yarn coverage | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
- name: Lint | |
run: yarn lint | |
- name: Build | |
run: yarn build | |
npm-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: | |
- uses: actions/checkout@v2 | |
with: | |
# needed for semantic release | |
# see https://github.com/semantic-release/git/issues/196#issuecomment-702839100 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@master | |
with: | |
node-version: 10.x | |
- name: Yarn cache directory | |
id: yarn-cache-dir | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Yarn cache | |
uses: actions/cache@v1 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install | |
run: yarn install --pure-lockfile | |
- name: Build | |
run: yarn build | |
- name: Release | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
docs-release: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "10.x" | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }} | |
- name: Release to GitHub Pages | |
env: | |
USE_SSH: true | |
GIT_USER: git | |
run: | | |
cd website | |
git config --global user.email "[email protected]" | |
git config --global user.name "Kyle Pfromer" | |
yarn install --frozen-lockfile | |
yarn deploy |