Skip to content

.NET CD

.NET CD #3

Workflow file for this run

name: .NET CD
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.1
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
dry_run: true
extends: |
@semantic-release/commit-analyzer
@semantic-release/github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -p:VersionPrefix=${{ steps.semantic.outputs.last_release_version }} -c Release
- name: Test
run: dotnet test --no-build --verbosity normal -c Release
- name: Pack
run: dotnet pack -c Release -o ./.ci-nuget -p:PackageVersion=${{ steps.semantic.outputs.last_release_version }}
- name: Push Package to NuGet.org
run: dotnet nuget push ./.ci-nuget/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json