Skip to content

chore(deps): update typescript-eslint monorepo to v7 #893

chore(deps): update typescript-eslint monorepo to v7

chore(deps): update typescript-eslint monorepo to v7 #893

Workflow file for this run

name: CI
on: [push]
jobs:
build:
name: Lint, test, and build on Node ${{ matrix.node }} and ${{ matrix.os }}
strategy:
matrix:
node: # running more than one node causes semantic release tags to be incorrectly created. Fix when you have time!
# - 14
- 16
# - 18
os:
# - macOS-latest
# - windows-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
with:
version: latest # 7.1.0 # uses version set in package.json > packageManager
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'pnpm' # Ref: https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md
- name: Install Dependencies
run: pnpm install --frozen-lockfile # verifies lockfile matches package.json
shell: bash
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test -- --ci --coverage --maxWorkers=2
env:
CI: true
- name: Build
run: pnpm build
release:
name: Upload coverage report and release package as needed
needs: [build]
strategy:
matrix:
node: # ****run only one version****
# - 14
- 16
# - 18
os: # ****run only one OS****
# - macOS-latest
# - windows-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
with:
version: latest # 7.1.0 # uses version set in package.json > packageManager
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'pnpm' # Ref: https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md
- name: Install Dependencies
run: pnpm install --frozen-lockfile # verifies lockfile matches package.json
shell: bash
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
file: ./coverage/clover.xml # optional
- name: Build
run: pnpm build
# https://github.com/cycjimmy/semantic-release-action
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
# Recommended to specify specifying version range to reduce version errors
# https://www.npmjs.com/package/semantic-release
semantic_version: 19.0.3
branch: main
# https://www.npmjs.com/package/@semantic-release/git
# https://www.npmjs.com/package/@semantic-release/changelog
extra_plugins: |
@semantic-release/git@10.0.1
@semantic-release/changelog@6.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # no need to set since its provided by github automatically
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push updates to branch for major version
# if there is a new version published, let's say v1.2.3
# then this step will update branch "v1" to this commit
# https://github.com/cypress-io/github-action/branches
if: steps.semantic.outputs.new_release_published == 'true'
run: 'git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/v${{steps.semantic.outputs.new_release_major_version}}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}