Preparation for PR. #211
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |