Kotz.Utilities v2.3.2 #14
Workflow file for this run
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 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: | | |
7.0.x | |
8.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. |