-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Push to NuGet * Add build step * Fix imports
- Loading branch information
Showing
10 changed files
with
109 additions
and
5 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish NuGet Packages | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get Version | ||
id: get-version | ||
shell: pwsh | ||
run: | | ||
$version = [System.Version]::Parse("${{ github.ref_name }}".Replace('v', '')).ToString() | ||
echo "version=$version" >> $env:GITHUB_OUTPUT | ||
echo $version | ||
- name: Print Debug Info | ||
run: dotnet --info | ||
|
||
- name: Pack | ||
run: dotnet --pack -p:Version="${{ steps.get-version.outputs.version }}" -p:RepositoryCommit="${{ github.sha }}" | ||
|
||
- name: Validate | ||
shell: pwsh | ||
run: ./scripts/validate-nupkgs.ps1 | ||
|
||
- name: Push to NuGet | ||
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This script extracts all "*.nupkg" files and parses the ".nuspec" file. | ||
# It looks at the dependencies of that package and alerts if some dependencies | ||
# of this organization are not available. | ||
|
||
$Organization = "NexusMods" | ||
|
||
$nupkgs = Get-ChildItem -Path "*" -Recurse -Include "*.nupkg" | ||
|
||
$allPackages = [System.Collections.Generic.HashSet[string]]::new() | ||
$allDependencies = [System.Collections.Generic.HashSet[string]]::new() | ||
|
||
foreach ($item in $nupkgs) | ||
{ | ||
$packageName = [System.IO.Path]::GetFileName( | ||
[System.IO.Path]::GetDirectoryName( | ||
[System.IO.Path]::GetDirectoryName( | ||
[System.IO.Path]::GetDirectoryName($item)))) | ||
|
||
$allPackages.Add($packageName) | ||
$extractedPath = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($item.FullName), "extracted") | ||
|
||
Expand-Archive -Path $item.FullName -DestinationPath $extractedPath -Force | ||
|
||
$nuspecFilePath = [System.IO.Path]::Combine($extractedPath, $packageName + ".nuspec") | ||
|
||
if (![System.IO.File]::Exists($nuspecFilePath)) { | ||
echo "File $nuspecFilePath does not exist!" | ||
exit 1 | ||
} | ||
|
||
# Select-Xml doesn't want to work for whatever reason | ||
#$dependencies = Select-Xml -Path $nuspecFilePath -XPath "//dependency" | ||
|
||
$xml = ([xml](Get-Content -Path $nuspecFilePath)) | ||
$dependencies = $xml.ChildNodes[1].ChildNodes.dependencies.group.dependency.id | ||
|
||
foreach ($dep in $dependencies) { | ||
if (!$dep.StartsWith($Organization)) { | ||
continue | ||
} | ||
|
||
$allDependencies.Add($dep) | ||
} | ||
} | ||
|
||
$allDependencies.ExceptWith($allPackages) | ||
|
||
foreach ($missing in $allDependencies) { | ||
echo "The following package wasn't packed: $missing" | ||
} | ||
|
||
if ($allDependencies.Count -ne 0) { | ||
exit 1 | ||
} else { | ||
echo "All packages are correct" | ||
} |
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
1 change: 0 additions & 1 deletion
1
src/NexusMods.App.UI/RightContent/LoadoutGrid/Columns/IDataGridColumnFactory.cs
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
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
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
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