Skip to content

feat: forbid throw new error #105

feat: forbid throw new error

feat: forbid throw new error #105

Workflow file for this run

on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: Lint and Build
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/cache@v3
with:
path: |
node_modules
.yarn/cache
key: node_modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# There is a weird bug in typescript eslint where if fails if you are linting an eslint
# plugin with a config that uses that same eslint plugin. We need the latest typescript eslint versions
# since they fixed some other problems and updating causes lint to stop working.
# - run: yarn lint
- run: yarn build
- uses: actions/upload-artifact@v3
with:
name: lib
path: lib/
release:
name: Release
needs: build
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/alpha'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/cache@v3
with:
path: |
node_modules
.yarn/cache
key: node_modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/download-artifact@v3
with:
name: lib
path: lib/
- run: yarn release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}