File tree Expand file tree Collapse file tree 2 files changed +65
-0
lines changed
Expand file tree Collapse file tree 2 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Test
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v2
15+ - name : Setup .NET Core
16+ uses : actions/setup-dotnet@v1
17+ with :
18+ dotnet-version : 5.0.301
19+ - name : Setup dotnet tools
20+ run : dotnet tool restore
21+ - name : Install dependencies
22+ run : dotnet restore
23+ - name : Check formatting
24+ run : dotnet fantomas . -r --check
25+ - name : Build
26+ run : dotnet build --configuration Release --no-restore
27+ - name : Test
28+ run : dotnet run RunTests
Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ tags :
4+ - " v*" # Push events to matching v*, i.e. v1.0, v20.15.10
5+
6+ name : Publish Release
7+ jobs :
8+ build :
9+ name : Create Release
10+ runs-on : ubuntu-latest
11+ timeout-minutes : 10
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v1
15+
16+ - name : Setup .NET Core
17+ uses : actions/setup-dotnet@v1
18+ with :
19+ dotnet-version : 5.0.301
20+
21+ - name : Setup tools
22+ run : dotnet tool restore
23+ - name : Dotnet Pack
24+ run : dotnet pack -c release -p:PackageVersion=${GITHUB_REF##*/v} -p:FileVersion=${GITHUB_REF##*/v} -p:InformationalVersion=${GITHUB_REF##*/v}
25+
26+ - name : Push Nuget
27+ run : dotnet nuget push src/bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
28+ continue-on-error : false
29+
30+ - name : Create Release
31+ uses : actions/create-release@master
32+ env :
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ with :
35+ tag_name : ${{ github.ref }}
36+ release_name : Release ${{ github.ref }}
37+ draft : false
You can’t perform that action at this time.
0 commit comments