chore(deps): update typescript-eslint monorepo to v8 #944
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: 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/[email protected] | |
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/[email protected] | |
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/[email protected] | |
@semantic-release/[email protected] | |
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 }} |