Skip to content

Merge pull request #555 from mclift/553 #17

Merge pull request #555 from mclift/553

Merge pull request #555 from mclift/553 #17

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 }}