Skip to content

Try fix gitversion #12

Try fix gitversion

Try fix gitversion #12

Workflow file for this run

name: Publish nuget
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
Deploy:
runs-on: ubuntu-20.04
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.5.0'
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0
env:
DOTNET_ROLL_FORWARD: Major
- name: Echo version
run: echo ${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Setup .NET Core SDK '7.x.x'
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.x.x'
include-prerelease: true
- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1
with:
version: ${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Display dotnet version
run: dotnet --version
- name: Install Dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Publish the package
run: dotnet nuget push **/*.nupkg -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate