feat: forbid throw new error #105
Workflow file for this run
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
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 }} |