Skip to content

Commit

Permalink
created release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
catalingavan committed May 3, 2024
1 parent ebc0189 commit ad20dae
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 23 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ jobs:
dotnet-version: |
2.x
3.x
5.x
6.x
7.x
8.x
- name: Run Tests
working-directory: src
run: dotnet test --configuration Release || true
run: dotnet test --configuration Release

- name: Build projects
run: |
Expand All @@ -40,7 +39,20 @@ jobs:
dotnet pack "src/$project/$project.csproj" --no-build -o . /p:PackageVersion=${{ github.event.inputs.release_version }}
done
- name: Upload nuget package
uses: actions/upload-artifact@v4
- name: Publish NuGet packages
run: |
dotnet nuget push "./*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- name: Publish GitHub packages
run: |
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.KISSLOG_RELEASE }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/KissLog-net/index.json"
dotnet nuget push "./*.nupkg" --source "github"
- name: Release
uses: softprops/[email protected]
with:
path: ./*.nupkg
body: v${{ github.event.inputs.release_version }}
draft: false
tag_name: v${{ github.event.inputs.release_version }}
files: |
./*.nupkg
17 changes: 8 additions & 9 deletions adapters/KissLog.Adapters.NLog/KissLog.Adapters.NLog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@
<PackageProjectUrl>https://logbee.net</PackageProjectUrl>
<RepositoryUrl>https://github.com/KissLog-net/KissLog.Sdk</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>PackageIcon.png</PackageIcon>
<PackageIcon>icon.png</PackageIcon>
<Version Condition="'$(BUILD_VERSION)' == ''">1.0.0</Version>
<Version Condition="'$(BUILD_VERSION)' != ''">$(BUILD_VERSION)</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<ItemGroup>
<None Include="../../assets/icon.png" Pack="true" Visible="false" PackagePath="/" />
<None Include="../../README.md" Pack="true" Visible="false" PackagePath="/" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>KissLog.Adapters.NLog.Tests</_Parameter1>
Expand All @@ -27,12 +34,4 @@
<ItemGroup>
<ProjectReference Include="..\..\src\KissLog\KissLog.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="PackageIcon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

</Project>
Binary file removed adapters/KissLog.Adapters.NLog/PackageIcon.png
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@
<PackageProjectUrl>https://logbee.net</PackageProjectUrl>
<RepositoryUrl>https://github.com/KissLog-net/KissLog.Sdk</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>PackageIcon.png</PackageIcon>
<PackageIcon>icon.png</PackageIcon>
<Version Condition="'$(BUILD_VERSION)' == ''">1.0.0</Version>
<Version Condition="'$(BUILD_VERSION)' != ''">$(BUILD_VERSION)</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<ItemGroup>
<None Include="../../assets/icon.png" Pack="true" Visible="false" PackagePath="/" />
<None Include="../../README.md" Pack="true" Visible="false" PackagePath="/" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>KissLog.Adapters.log4net.Tests</_Parameter1>
Expand All @@ -27,12 +34,4 @@
<ItemGroup>
<ProjectReference Include="..\..\src\KissLog\KissLog.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="PackageIcon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

</Project>
Binary file removed adapters/KissLog.Adapters.log4net/PackageIcon.png
Binary file not shown.

0 comments on commit ad20dae

Please sign in to comment.