Skip to content

Kotz.Utilities v3.0.0 #15

Kotz.Utilities v3.0.0

Kotz.Utilities v3.0.0 #15

Workflow file for this run

name: "Publish Release"
on:
release:
types: ["published"]
jobs:
publish_release:
runs-on: ubuntu-latest
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Setup .NET"
uses: "actions/setup-dotnet@v4"
with:
dotnet-version: |
8.0.x
9.0.x
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test --no-build -c Release
- name: "Build Nuget Packages"
run: |
mkdir build
dotnet pack --include-symbols -p:Version='${{ github.event.release.tag_name }}' -p:SymbolPackageFormat=snupkg -c Release -o build
- name: "Publish Nuget Packages"
run: "dotnet nuget push \"build/*\" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json"
- name: "Upload Nuget Packages To Github Release"
uses: "ncipollo/[email protected]"
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "build/*"
token: ${{ secrets.REPO_GITHUB_TOKEN }}
tag: ${{ github.event.release.tag_name }}
omitBodyDuringUpdate: true # We don't want to update the body of the release.
omitNameDuringUpdate: true # We don't want to update the name of the release.