Skip to content

Commit

Permalink
chore: lint main branch before publishing beta
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jun 24, 2024
1 parent 398d51a commit 89161f7
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,24 @@ on:
- '!vitest.config.ts'

jobs:
test:
lint:
if: startsWith(github.event.head_commit.message, 'chore') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: true
- uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: pnpm
- name: Lint Commit Messages
run: pnpm dlx commitlint --from $(git describe --tags --abbrev=0)
- run: pnpm lint
test:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
Expand All @@ -27,10 +42,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Run Type Checker
run: pnpm tsc
- name: Run Tests
run: pnpm test
- run: pnpm test
publish-beta:
needs: test
runs-on: ubuntu-latest
Expand Down

0 comments on commit 89161f7

Please sign in to comment.