Skip to content

feat: Updated GitHub Action #36

feat: Updated GitHub Action

feat: Updated GitHub Action #36

Workflow file for this run

name: Build and Publish HIDDevices
on:
push:
branches: [ master ]
paths-ignore:
- '**/.md'
- '**/.txt'
- '.github/**'
- 'HIDDevices.Generator/**'
- 'HIDDevices.Usages/**'
- 'HIDDevices.Sample/**'
- 'HIDDevices.Test/**'
jobs:
publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Avoid shallow clone so NBGV can do its work.
submodules: 'recursive'
- name: Set version
uses: dotnet/[email protected]
with:
setAllVars: true
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
include-prerelease: true
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore -p:ContinuousIntegrationBuild=true -p:DeterministicSourcePaths=true
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal -p:ContinuousIntegrationBuild=true -p:DeterministicSourcePaths=true
- name: Publish
uses: alirezanet/[email protected]
with:
PROJECT_FILE_PATH: HIDDevices/HIDDevices.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
INCLUDE_SYMBOLS: true
VERSION_STATIC: ${{env.NBGV_Version}}