Skip to content

Commit

Permalink
chore(v0.0.5): Ship TC libraries with nuget package
Browse files Browse the repository at this point in the history
The build artifact snappy.library, as well as latest rplc.library
are being packed with nuget.
This is a prerequisite for the CLI install command.
  • Loading branch information
densogiaichned committed Feb 18, 2024
1 parent 18a8552 commit 58e93cc
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 44 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ jobs:
with:
name: snappy
path: |
**/*.compiled-library
**/*.library
**/*.library
cd-tchaxx-snappy-cli:
needs: ci-tchaxx-snappy-cli
Expand All @@ -74,10 +73,22 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.dotnet_versions }}

- uses: actions/download-artifact@v4
with:
name: snappy
path: .dist/

- name: Download latest rplc.library
run: curl -L https://github.com/tchaxx/rplc/releases/latest/download/rplc.library -o .dist/rplc.library

- name: Restore dependencies
run: dotnet restore ${{ env.solution }}
- name: Build
run: dotnet build -c Release --no-restore ${{ env.solution }}
- name: Pack
env:
INCLUDE_TC_LIBRARIES: true
run: dotnet pack -c Release --no-restore ${{ env.solution }}

- name: Publish on version change
id: publish_nuget
uses: alirezanet/[email protected]
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -421,4 +421,6 @@ LineIDs.dbg.bak
_Boot/
_CompileInfo/
_Libraries/
_Repository/
_Repository/

.dist/
82 changes: 43 additions & 39 deletions src/TcHaxx.Snappy.CLI/TcHaxx.Snappy.CLI.csproj
Original file line number Diff line number Diff line change
@@ -1,46 +1,50 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<RepositoryUrl>https://github.com/TcHaxx/snappy</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>snapshot-testing; test-framework; unit-test; twincat; beckhoff;</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/TcHaxx/snappy</PackageProjectUrl>
<Description>A Snapshot Testing framework for TwinCAT 3</Description>
<Copyright>Copyright (c) 2024 densogiaichned</Copyright>
<Title>TwinCAT Snapshot Testing framework</Title>
<Version>0.0.4</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<PackAsTool>True</PackAsTool>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Authors>densogiaichned</Authors>
<Company>TcHaxx</Company>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<RepositoryUrl>https://github.com/TcHaxx/snappy</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>snapshot-testing; test-framework; unit-test; twincat; beckhoff;</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/TcHaxx/snappy</PackageProjectUrl>
<Description>A Snapshot Testing framework for TwinCAT 3</Description>
<Copyright>Copyright (c) 2024 densogiaichned</Copyright>
<Title>TwinCAT Snapshot Testing framework</Title>
<Version>0.0.5</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<PackAsTool>True</PackAsTool>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Authors>densogiaichned</Authors>
<Company>TcHaxx</Company>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\TcHaxx.Snappy.TcADS\TcHaxx.Snappy.TcADS.csproj" />
<ProjectReference Include="..\TcHaxx.Snappy.Verifier\TcHaxx.Snappy.Verifier.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TcHaxx.Snappy.TcADS\TcHaxx.Snappy.TcADS.csproj" />
<ProjectReference Include="..\TcHaxx.Snappy.Verifier\TcHaxx.Snappy.Verifier.csproj" />
</ItemGroup>

<ItemGroup Condition="$(INCLUDE_TC_LIBRARIES)!=''">
<Content Include="../../.dist/snappy.library" Pack="true" PackagePath="content/.dist/snappy.library" />
<Content Include="../../.dist/rplc.library" Pack="true" PackagePath="content/.dist/rplc.library" />
</ItemGroup>
</Project>

0 comments on commit 58e93cc

Please sign in to comment.