Skip to content

Commit e16b3f1

Browse files
committed
housekeeping: Update CI
1 parent f9a923f commit e16b3f1

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

.github/workflows/CI.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@ name: CI
22
on: [push, pull_request]
33

44
jobs:
5+
check_format:
6+
name: Check format
7+
runs-on: windows-latest
8+
steps:
9+
- name: Setup .NET
10+
uses: actions/setup-dotnet@v1
11+
with:
12+
dotnet-version: 5.0.x
13+
14+
- name: Install dotnet-format
15+
run: dotnet tool update -g dotnet-format
16+
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Run dotnet format check
21+
run: dotnet format -wsa -v diag --check
522

623
test:
724
name: Test
@@ -31,7 +48,7 @@ jobs:
3148
3249
build:
3350
name: Build
34-
needs: test
51+
needs: [test, check_format]
3552
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
3653
runs-on: ubuntu-latest
3754
strategy:
@@ -55,4 +72,26 @@ jobs:
5572
shell: pwsh
5673
run: |
5774
dotnet nuget push ${{ matrix.ProjectName }}\bin\Release\*.nupkg -s https://nuget.pkg.github.com/HMBSbige -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
58-
dotnet nuget push ${{ matrix.ProjectName }}\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NuGetAPIKey }} --skip-duplicate
75+
dotnet nuget push ${{ matrix.ProjectName }}\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NuGetAPIKey }} --skip-duplicate
76+
77+
release:
78+
name: Release
79+
needs: build
80+
runs-on: ubuntu-latest
81+
82+
steps:
83+
- name: Get tag
84+
id: tag
85+
uses: dawidd6/action-get-tag@v1
86+
87+
- name: Changelog
88+
uses: glennawatson/ChangeLog@v1
89+
id: changelog
90+
91+
- name: Create Release
92+
uses: ncipollo/release-action@v1
93+
with:
94+
token: ${{ secrets.GITHUB_TOKEN }}
95+
body: ${{ steps.changelog.outputs.commitLog }}
96+
draft: false
97+
prerelease: false

0 commit comments

Comments
 (0)