Skip to content

v2.3.0-beta.1

v2.3.0-beta.1 #15

Workflow file for this run

name: Release
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
env:
BUILD_CONFIG: 'Release'
SOLUTION: 'DocxTemplater.sln'
steps:
- name: echo
run: echo ${{ github.ref }}
- uses: actions/checkout@v4 #Fetch all history for all tags and branches
with:
fetch-depth: 0
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.2.0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.x 7.x 8.x
- name: Restore dependencies
run: nuget restore $SOLUTION
- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore
- name: Run tests
run: dotnet test -c $BUILD_CONFIG --no-restore --no-build --verbosity normal
- name: Publish
if: startsWith(github.ref, 'refs/tags/v') == true
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}