Publish #15
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: Publish | |
on: | |
workflow_dispatch: {} | |
jobs: | |
tests: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
7.0.x | |
6.0.x | |
3.1.x | |
- run: dotnet restore | |
- run: dotnet build --no-restore --configuration Release | |
- run: dotnet test --no-build --configuration Release --verbosity normal | |
publish: | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- run: dotnet restore | |
- run: dotnet build --configuration Release Intercom/Intercom.csproj | |
- run: dotnet pack --configuration Release Intercom/Intercom.csproj --no-build -p:Version=${{vars.VERSION}}.${{github.run_number}}-alpha -p:PackageVersion=${{vars.VERSION}}.${{github.run_number}}-alpha -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:NuspecFile=Intercom.nuspec | |
- run: dotnet nuget push Intercom/bin/Release/Intercom-NET.${{vars.VERSION}}.${{github.run_number}}-alpha.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate |