diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ad52232 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Release package to NuGet + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v2 + with: + dotnet-version: '6.0.x' + source-url: https://nuget.pkg.github.com/stscoundrel/index.json + env: + NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - run: dotnet build --configuration Release src/Riimut.csproj + - name: Create the package + run: dotnet pack --configuration Release src/Riimut.csproj + - name: Publish the package to NuGet + run: dotnet nuget push src/bin/Release/*.nupkg --api-key ${{secrets.NUGET_TOKEN}} --skip-duplicate --source https://api.nuget.org/v3/index.json