Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:

jobs:
build:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
name: Build Pack and Publish
steps:
- uses: actions/checkout@v7

- name: Setup .NET 9
- name: Setup .NET 10
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
Expand All @@ -22,5 +25,11 @@ jobs:
- name: Pack
run: dotnet pack -c Release --no-build --output . --version-suffix ${{github.run_number}} src/Cloudtoid.CodeAnalysis.csproj

- name: NuGet login
uses: NuGet/login@v1
id: nuget-login
with:
user: pedramr

- name: Push
run: dotnet nuget push Cloudtoid.CodeAnalysis.*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.nuget_org_api_key }}
run: dotnet nuget push Cloudtoid.CodeAnalysis.*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }}
5 changes: 5 additions & 0 deletions src/Cloudtoid.CodeAnalysis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<!-- NuGet Packaging -->
<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageId>Cloudtoid.CodeAnalysis</PackageId>
<Title>Cloudtoid.CodeAnalysis</Title>
<Authors>pedram@rezaei.us</Authors>
Expand Down Expand Up @@ -35,4 +36,8 @@
<Content Include="assets\stylecop.json" PackagePath="build" />
</ItemGroup>

<ItemGroup>
<None Include="../README.md" Pack="true" PackagePath="/" />
</ItemGroup>

</Project>