Skip to content

Commit

Permalink
add gh actions for nuget
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrsk committed Feb 20, 2023
1 parent b391240 commit 2053486
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release to NuGet

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
- name: Build
working-directory: ./PastaParser
run: dotnet build -c Release
- name: Test
working-directory: ./PastaParser
run: dotnet test -c Release --no-build
- name: Pack nugets
working-directory: ./PastaParser
run: dotnet pack -c Release --no-build --output .
- name: Push to NuGet
working-directory: ./PastaParser
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json
21 changes: 21 additions & 0 deletions PastaParser/PastaParser.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,33 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageId>DnKR.PastaParse</PackageId>
<Title>CopypastaRu-parser</Title>
<Authors>DnKrsk</Authors>
<Company>DnKrsk</Company>
<PackageProjectUrl>https://github.com/dkrsk/CopypastaRu-parser</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/dkrsk/CopypastaRu-parser</RepositoryUrl>
<PackageTags>pasta; parser; copypastasru</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
</PropertyGroup>

<ItemGroup>
<Compile Include="Library.fs" />
</ItemGroup>

<ItemGroup>
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.46" />
</ItemGroup>
Expand Down

0 comments on commit 2053486

Please sign in to comment.