Merge pull request #274 from q2ebanking/enhancement/BoaConstrictor-27… #146
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
# Builds and publishes the Boa Constrictor packages to NuGet.org whenever versions change. | |
# The NuGet key is currently Andy Knight's NuGet account. | |
# There are 8-minute sleeps because NuGet needs time to index new packages before they are made available. | |
name: Publish NuGet packages | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
publish: | |
name: Publish | |
runs-on: windows-latest | |
env: | |
NUGET_SOURCE: https://api.nuget.org/v3/index.json | |
CSPROJ_SCREENPLAY: Boa.Constrictor.Screenplay/Boa.Constrictor.Screenplay.csproj | |
CSPROJ_SELENIUM: Boa.Constrictor.Selenium/Boa.Constrictor.Selenium.csproj | |
CSPROJ_RESTSHARP: Boa.Constrictor.RestSharp/Boa.Constrictor.RestSharp.csproj | |
CSPROJ_XUNIT: Boa.Constrictor.Xunit/Boa.Constrictor.Xunit.csproj | |
CSPROJ_CLASSIC: Boa.Constrictor/Boa.Constrictor.csproj | |
steps: | |
# Prepare the environment | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.0.x' | |
# Screenplay | |
- name: Build Boa.Constrictor.Screenplay project | |
run: dotnet build ${{env.CSPROJ_SCREENPLAY}} --configuration Release | |
- name: Pack Boa.Constrictor.Screenplay project | |
run: dotnet pack ${{env.CSPROJ_SCREENPLAY}} --configuration Release --no-build --output Screenplay | |
- name: Push Boa.Constrictor.Screenplay package | |
run: dotnet nuget push Screenplay/**/*.nupkg --source ${{env.NUGET_SOURCE}} --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate | |
# Selenium, RestSharp and Xunit | |
- name: Wait 8 minutes for NuGet indexing | |
run: Start-Sleep -s 480 | |
shell: powershell | |
- name: Build Boa.Constrictor.Selenium project | |
run: dotnet build ${{env.CSPROJ_SELENIUM}} --configuration Release | |
- name: Pack Boa.Constrictor.Selenium project | |
run: dotnet pack ${{env.CSPROJ_SELENIUM}} --configuration Release --no-build --output Selenium | |
- name: Push Boa.Constrictor.Selenium package | |
run: dotnet nuget push Selenium/**/*.nupkg --source ${{env.NUGET_SOURCE}} --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate | |
- name: Build Boa.Constrictor.RestSharp project | |
run: dotnet build ${{env.CSPROJ_RESTSHARP}} --configuration Release | |
- name: Pack Boa.Constrictor.RestSharp project | |
run: dotnet pack ${{env.CSPROJ_RESTSHARP}} --configuration Release --no-build --output RestSharp | |
- name: Push Boa.Constrictor.RestSharp package | |
run: dotnet nuget push RestSharp/**/*.nupkg --source ${{env.NUGET_SOURCE}} --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate | |
- name: Build Boa.Constrictor.Xunit project | |
run: dotnet build ${{env.CSPROJ_XUNIT}} --configuration Release | |
- name: Pack Boa.Constrictor.Xunit project | |
run: dotnet pack ${{env.CSPROJ_XUNIT}} --configuration Release --no-build --output Xunit | |
- name: Push Boa.Constrictor.Xunit package | |
run: dotnet nuget push Xunit/**/*.nupkg --source ${{env.NUGET_SOURCE}} --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate | |
# Classic | |
- name: Wait 8 minutes for NuGet indexing | |
run: Start-Sleep -s 480 | |
shell: powershell | |
- name: Build Boa.Constrictor project | |
run: dotnet build ${{env.CSPROJ_CLASSIC}} --configuration Release | |
- name: Pack Boa.Constrictor project | |
run: dotnet pack ${{env.CSPROJ_CLASSIC}} --configuration Release --no-build --output Classic | |
- name: Push Boa.Constrictor package | |
run: dotnet nuget push Classic/**/*.nupkg --source ${{env.NUGET_SOURCE}} --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate |