Skip to content

Commit

Permalink
remove duplicate "dotnet pack" command
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfredLange committed Sep 24, 2023
1 parent 3f9aa9d commit 18612aa
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 24 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ jobs:
build-and-test:
runs-on: ubuntu-latest
# outputs:
# nuget-package-path: ${{ steps.create-package.outputs.NUPKG_PATH }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.401

Expand All @@ -48,26 +46,19 @@ jobs:
# run: dotnet test --configuration Release --no-restore --no-build --verbosity normal

# I believe this step is superfluous, as the package is created in the build step:
- name: Create NuGet package
id: create-package
- name: Find NuGet package
id: find-package
run: |
dotnet pack --configuration Release --no-build --no-restore
NUPKG_PATH=$(find . -name '*.nupkg' -type f -execdir readlink -f {} \;)
echo "NuGet package path: $NUPKG_PATH"
NUPKG_PATH=$(find . -name '*.nupkg' -print -quit)
echo "NuGet package is at path: $NUPKG_PATH"
echo "NUPKG_PATH=$NUPKG_PATH" >> "$GITHUB_OUTPUT"
# dotnet pack --configuration Release --no-build --no-restore

- name: Print Env Variable
id: print-env
env:
NUPKG_PATH: ${{ steps.create-package.outputs.NUPKG_PATH }}
run: |
echo "NUPKG_PATH=$NUPKG_PATH"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: nuget-package
path: ${{ steps.create-package.outputs.NUPKG_PATH }}
name: nuget-package.nupkg
path: ${{ steps.find-package.outputs.NUPKG_PATH }}
retention-days: 7

deploy:
Expand All @@ -81,7 +72,7 @@ jobs:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: nuget-package
name: nuget-package.nupkg
path: ${{ github.workspace }}

- name: Publish NuGet package
Expand All @@ -95,5 +86,5 @@ jobs:
run: |
NUPKG_PATH=$(find . -name '*.nupkg' -print -quit)
echo "NuGet package path (as found in this job): $NUPKG_PATH"
dotnet nuget push $NUPKG_PATH --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
# echo "Placeholder for publishing NuGet package"
echo "Placeholder for publishing NuGet package"
# dotnet nuget push $NUPKG_PATH --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
incrementing the minor version will do. [Manfred, 19sep2023] -->
<Project>
<PropertyGroup>
<Version>1.12.0</Version>
<Version>1.99.0</Version>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion Faker/Faker.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
<AssemblyName>RimuTec.Faker</AssemblyName>
<RootNamespace>RimuTec.Faker</RootNamespace>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ RimuTec.Faker supports the following targets:
- .NET Standard 2.0 (netstandard2.0)
- .NET Standard 2.1 (netstandard2.1)
- .NET Framework 4.6.2 (net462)
- .NET 5.0 (net5.0)
- .NET 6.0 (net6.0)
- .NET 7.0 (net7.0) (package to be released)
- .NET 7.0 (net7.0) (from version 1.12.0 onwards)

In case you need support for other targets, please file an issue at [https://github.com/RimuTec/Faker/issues](https://github.com/RimuTec/Faker/issues) and we'll check if we can support the target you need as well. Thank you!

Expand Down
4 changes: 4 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release Notes

## Version 2.0.0
- remove support for .NET 5.0 as it is deprecated

## Version 1.12.0
- upgrade dependencies
- add net7.0 as supported target framework
Expand All @@ -8,6 +11,7 @@
## Version 1.11.0
- upgrade dependencies
- upgrade dev container to SDK 5.0.102
- add github action to deploy new package versions when version number is bumped

## Version 1.10.0
- Upgraded package reference for YamlDotNet to version 9.1.1
Expand Down

0 comments on commit 18612aa

Please sign in to comment.