Skip to content

v8.0.0

v8.0.0 #39

Workflow file for this run

name: Deploy
on:
release:
types:
- published
jobs:
publish:
name: Publish
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'master' }}
env:
BW_PROJECT_NAME: Bandwidth.Iris
BW_PROJECT_TEST_NAME: Bandwidth.Iris.Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0"
- name: Run unit tests
run: dotnet test $BW_PROJECT_TEST_NAME
- name: Pack NuGet package
run: dotnet pack --configuration Release $BW_PROJECT_NAME -p:PackageVersion=$RELEASE_VERSION
- name: Publish NuGet package
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
NUGET_SOURCE: https://api.nuget.org/v3/index.json
run: dotnet nuget push $BW_PROJECT_NAME/bin/Release/*.nupkg -s $NUGET_SOURCE -k $NUGET_KEY