v3.0.1.2 [BugFix] TimeSeries #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Mtconnect.AdapterSdk to NuGet | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
env: | |
GH_NUGET_REGISTRY: https://nuget.pkg.github.com/ | |
GH_NUGET_NAMESPACE: trueanalyticssolutions | |
GH_NUGET_API_KEY: ${{ secrets.GITHUB_TOKEN }} | |
VS_PROJECT_FOLDER: AdapterSdk | |
VS_PROJECT: AdapterSdk.csproj | |
jobs: | |
build: | |
name: Build Package | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@main | |
with: | |
dotnet-version: '3.1' | |
- name: Build Mtconnect.Adapter with dotnet | |
run: dotnet build "${{ env.VS_PROJECT_FOLDER }}\${{ env.VS_PROJECT }}" --configuration Release | |
- name: Pack Mtconnect.Adapter | |
run: dotnet pack "${{ env.VS_PROJECT_FOLDER }}\${{ env.VS_PROJECT }}" --configuration Release -o finalpackage --no-build --include-symbols | |
- name: Publish Artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: nupkg | |
path: finalpackage | |
deploy: | |
needs: build | |
name: Deploy Packages | |
runs-on: windows-latest | |
steps: | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@main | |
with: | |
dotnet-version: '3.1' | |
- name: Download Artifact | |
uses: actions/download-artifact@main | |
with: | |
name: nupkg | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@main | |
with: | |
nuget-api-key: ${{ secrets.NUGETORG_API_KEY }} | |
nuget-version: latest | |
- name: Push NuGet package to NuGet.org | |
run: dotnet nuget push nupkg\*.nupkg -k ${{ secrets.NUGETORG_API_KEY }} -s https://nuget.org --skip-duplicate | |
- name: Push NuGet package to GitHub Packages | |
run: dotnet nuget push nupkg\*.nupkg --source ${{ env.GH_NUGET_REGISTRY }}${{ env.GH_NUGET_NAMESPACE }} --api-key ${{ env.GH_NUGET_API_KEY }} |