Fix NU5128 #361
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: Check IDAS Libs (NuGet) | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths-ignore: | |
- 'WebLibs/**' | |
- '.github/workflows/**' | |
- '!.github/workflows/check-NuGet-Libs.yml' | |
env: | |
SDK_VERSION: 8.0.x | |
PACKAGE_1: GDL.IDAS.Crypto | |
PACKAGE_1_FULL: Gandalan.IDAS.Crypto | |
PACKAGE_2: GDL.IDAS.Logging | |
PACKAGE_2_FULL: Gandalan.IDAS.Logging | |
PACKAGE_3: GDL.IDAS.WebApi.Client | |
PACKAGE_3_FULL: Gandalan.IDAS.WebApi.Client | |
PACKAGE_4: GDL.IDAS.WebApi.Client.Wpf | |
PACKAGE_4_FULL: Gandalan.IDAS.WebApi.Client.Wpf | |
PACKAGE_5: GDL.IDAS.Contracts | |
PACKAGE_5_FULL: Gandalan.IDAS.Contracts | |
BUILD_CONFIG: Release | |
OUTPUT_DIR: ./GDLPackages | |
jobs: | |
check-nuget-libs: | |
runs-on: ubuntu-22.04 # ubuntu-latest has issue with nuget pack command (nuget: 2: mono: not found) | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 50 | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@v2 | |
- name: Set release_name | |
id: set_release_name | |
run: echo "release_name=$(date +'%-Y.%-m.%-d').$GITHUB_RUN_NUMBER" >> $GITHUB_OUTPUT | |
- name: Setup .NET Core SDK ${{ env.SDK_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.SDK_VERSION }} | |
- name: Run UpdateVersionInfo.ps1 with ${{ steps.set_release_name.outputs.release_name }} | |
shell: pwsh | |
run: .\UpdateVersionInfo.ps1 ${{ steps.set_release_name.outputs.release_name }} | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration ${{ env.BUILD_CONFIG }} --no-restore -p:Version=${{ steps.set_release_name.outputs.release_name }} | |
- name: Create package ${{ env.PACKAGE_1 }} | |
run: nuget pack ${{ env.PACKAGE_1_FULL }}/${{ env.PACKAGE_1 }}.nuspec -NonInteractive -Verbosity Detailed -OutputDirectory ${{ env.OUTPUT_DIR }} -Symbols -SymbolPackageFormat snupkg | |
- name: Create package ${{ env.PACKAGE_2 }} | |
run: nuget pack ${{ env.PACKAGE_2_FULL }}/${{ env.PACKAGE_2 }}.nuspec -NonInteractive -Verbosity Detailed -OutputDirectory ${{ env.OUTPUT_DIR }} -Symbols -SymbolPackageFormat snupkg | |
- name: Create package ${{ env.PACKAGE_3 }} | |
run: nuget pack ${{ env.PACKAGE_3_FULL }}/${{ env.PACKAGE_3 }}.nuspec -NonInteractive -Verbosity Detailed -OutputDirectory ${{ env.OUTPUT_DIR }} -Symbols -SymbolPackageFormat snupkg | |
- name: Create package ${{ env.PACKAGE_4 }} | |
run: nuget pack ${{ env.PACKAGE_4_FULL }}/${{ env.PACKAGE_4 }}.nuspec -NonInteractive -Verbosity Detailed -OutputDirectory ${{ env.OUTPUT_DIR }} -Symbols -SymbolPackageFormat snupkg | |
- name: Create package ${{ env.PACKAGE_5 }} | |
run: nuget pack ${{ env.PACKAGE_5_FULL }}/${{ env.PACKAGE_5 }}.nuspec -NonInteractive -Verbosity Detailed -OutputDirectory ${{ env.OUTPUT_DIR }} -Symbols -SymbolPackageFormat snupkg |