-
Notifications
You must be signed in to change notification settings - Fork 771
36 lines (29 loc) · 1.56 KB
/
BuildAndTestOnPullRequests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: CI for Pull Requests
on:
push:
branches: [ dev, master ]
pull_request:
branches: [ dev, master ]
jobs:
Build_Stateless_solution:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: dotnet restore
- name: Build Stateless solution
run: dotnet build Stateless.sln --configuration Release --no-restore
- name: Test Stateless
run: dotnet test --no-restore --no-build --configuration Release
- name: Pack alpha version
if: github.ref == 'refs/heads/dev' && github.event_name == 'push' && github.repository == 'dotnet-state-machine/stateless'
run: dotnet pack src\Stateless\Stateless.csproj --version-suffix dev-${{github.run_id}} --configuration Release
- name: Publish alpha version
if: github.ref == 'refs/heads/dev' && github.event_name == 'push' && github.repository == 'dotnet-state-machine/stateless'
run: dotnet nuget push src\Stateless\bin\Release\*.nupkg -s nuget.org --api-key ${{ secrets.NUGETAPIKEY }}
- name: Pack Release version
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'dotnet-state-machine/stateless'
run: dotnet pack src\Stateless\Stateless.csproj --configuration Release
- name: Publish Release version
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'dotnet-state-machine/stateless'
run: dotnet nuget push src\Stateless\bin\Release\*.nupkg -s nuget.org --api-key ${{ secrets.NUGETAPIKEY }}