Skip to content

Commit a1b3a2b

Browse files
committed
Pack CLI as dotnet tool by GitHub Actions
+ minor enhancements and fixes related to packing as nuget
1 parent 782de32 commit a1b3a2b

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
PUBLISH_PROJECT_PATH: TeamTools.Linter.CommandLine/TeamTools.Linter.CommandLine.csproj
2222
OUTPUT_PATH: ${{ github.workspace }}/.bin/
2323
PUBLISH_PATH: ${{ github.workspace }}/.pub/
24+
NUPKG_PATH: ${{ github.workspace }}/.nupkgs
2425

2526
jobs:
2627
semver:
@@ -179,6 +180,16 @@ jobs:
179180
path: ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/net10.0
180181
if-no-files-found: error
181182

183+
- name: Upload nugets
184+
uses: actions/upload-artifact@v4
185+
if: ${{ matrix.publish }}
186+
with:
187+
name: nuget-packages
188+
include-hidden-files: true
189+
if-no-files-found: error
190+
path: |
191+
${{ env.NUPKG_PATH }}/*.nupkg
192+
182193
- name: Test
183194
if: ${{ !matrix.coverage }}
184195
run: >

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ node_packages/
1414

1515
# Packaged items
1616
.nupkg
17+
.nupkgs
1718

1819
# Sonar temp folders
1920
.sonarqube/

TeamTools.Linter.CommandLine/TeamTools.Linter.CommandLine.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
<IsPackable>true</IsPackable>
1212
<ToolCommandName>runlint</ToolCommandName>
1313
<PackAsTool>true</PackAsTool>
14-
<PackageOutputPath>../.nupkg</PackageOutputPath>
15-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
16-
<PackageReadmeFile>./readme.md</PackageReadmeFile>
14+
<PackageOutputPath>../.nupkgs</PackageOutputPath>
15+
<PackageReadmeFile>README.md</PackageReadmeFile>
16+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1717
<PackageTags>T-SQL;tsql;sqlproj;Analyzer;StaticCodeAnalysis;CodeQuality;linting;TeamTools</PackageTags>
18-
<Description>Command-line static code analysis tools for linting SQL projects</Description>
18+
<Description>Command-line static code analysis tools for linting T-SQL projects organized in SSDT manner</Description>
1919
</PropertyGroup>
2020

2121
<!-- Dependencies -->
@@ -31,7 +31,8 @@
3131

3232
<!-- Manual includes -->
3333
<ItemGroup>
34-
<Content Include="..\LICENSE" Pack="true" CopyToOutputDirectory="PreserveNewest" />
34+
<Content Include="$(MSBuildThisFileDirectory)..\LICENSE" Pack="true" CopyToOutputDirectory="PreserveNewest" PackagePath="\" />
35+
<Content Include="$(MSBuildThisFileDirectory)..\README.md" Pack="true" CopyToOutputDirectory="PreserveNewest" PackagePath="\" />
3536
<Content Include="DefaultConfig.json" CopyToOutputDirectory="PreserveNewest" />
3637
<Content Include="EvaluateConfig.json" CopyToOutputDirectory="PreserveNewest" />
3738
<Folder Include="plugins\" />

0 commit comments

Comments
 (0)