mirror of
https://github.com/Ryubing/SharpMetal.git
synced 2025-05-13 03:00:37 +01:00
39 lines
829 B
YAML
39 lines
829 B
YAML
name: Format
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
checks: write
|
|
|
|
concurrency:
|
|
group: format-${{ github.event.number }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: 7.0.x
|
|
- run: dotnet restore
|
|
- name: Format
|
|
run: dotnet format --verify-no-changes --report ./report.json -v d
|
|
- name: Upload report
|
|
if: failure()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: dotnet-format
|
|
path: ./report.json
|
|
build:
|
|
uses: ./.github/workflows/build.yml
|
|
needs: format
|
|
secrets: inherit
|