microsoft/typespec
Publicmirrored from https://github.com/microsoft/typespecAvailable
.github/workflows/consistency.yml
34lines · modecode
| 1 | name: Consistency |
| 2 | |
| 3 | # Controls when the workflow will run |
| 4 | on: |
| 5 | # Triggers the workflow on push or pull request events but only for the "main" branch |
| 6 | push: |
| 7 | branches: ["main"] |
| 8 | pull_request: |
| 9 | branches: ["main"] |
| 10 | workflow_dispatch: {} |
| 11 | |
| 12 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 13 | jobs: |
| 14 | check-changes: |
| 15 | name: Check Changes |
| 16 | runs-on: ubuntu-latest |
| 17 | steps: |
| 18 | - uses: actions/checkout@v4 |
| 19 | with: |
| 20 | fetch-depth: 0 ## Needed for Changesets to find `main` branch |
| 21 | |
| 22 | - name: Use Node.js 20.x |
| 23 | uses: actions/setup-node@v3 |
| 24 | with: |
| 25 | node-version: 20.x |
| 26 | |
| 27 | - uses: pnpm/action-setup@v2 |
| 28 | |
| 29 | - run: pnpm install |
| 30 | name: Install dependencies |
| 31 | |
| 32 | - run: npx chronus verify |
| 33 | name: Check changelog |
| 34 | if: ${{ !startsWith(github.head_ref, 'publish/') && !startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 'backmerge/') }} |
| 35 | |