Skip to content

Merge pull request #362 from contibru/patch-1 #454

Merge pull request #362 from contibru/patch-1

Merge pull request #362 from contibru/patch-1 #454

Workflow file for this run

name: Build and publish libplctag.NET nuget package
on: push
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build './src/'
- name: Test
run: dotnet test './src/'
- name: Publish libplctag on version change
id: publish_libplctag
uses: alirezanet/[email protected]
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: './src/libplctag/libplctag.csproj'
# NuGet package id, used for version detection & defaults to project name
PACKAGE_NAME: libplctag
# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
# VERSION_FILE_PATH: Directory.Build.props
# Regex pattern to extract version info in a capturing group
# VERSION_REGEX: <Version>(.*)<\/Version>
# Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
# VERSION_STATIC: 1.0.0
# Flag to toggle git tagging, enabled by default
TAG_COMMIT: true
# Format of the git tag, [*] gets replaced with actual version
TAG_FORMAT: libplctag-v*
# API key to authenticate with NuGet server
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# NuGet server uri hosting the packages, defaults to https://api.nuget.org
NUGET_SOURCE: https://api.nuget.org
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
# INCLUDE_SYMBOLS: false
- name: Publish libplctag.NativeImport on version change
id: publish_libplctag_native_import
uses: alirezanet/[email protected]
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: './src/libplctag.NativeImport/libplctag.NativeImport.csproj'
# NuGet package id, used for version detection & defaults to project name
PACKAGE_NAME: libplctag.NativeImport
# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
# VERSION_FILE_PATH: Directory.Build.props
# Regex pattern to extract version info in a capturing group
# VERSION_REGEX: <Version>(.*)<\/Version>
# Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
# VERSION_STATIC: 1.0.0
# Flag to toggle git tagging, enabled by default
TAG_COMMIT: true
# Format of the git tag, [*] gets replaced with actual version
TAG_FORMAT: libplctag.NativeImport-v*
# API key to authenticate with NuGet server
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# NuGet server uri hosting the packages, defaults to https://api.nuget.org
NUGET_SOURCE: https://api.nuget.org
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
# INCLUDE_SYMBOLS: false