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
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: publish
on:
workflow_dispatch: # Allow running the workflow manually from the GitHub UI
release:
types:
- published # Run the workflow when a new GitHub release is published

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
NuGetDirectory: ${{ github.workspace }}/nuget

defaults:
run:
shell: pwsh

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Get all history to allow automatic versioning using MinVer

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build -c Release --no-restore

- name: Pack
run: dotnet pack -c Release --no-build --output ${{ env.NuGetDirectory }}

- name: Push nupkg
run: dotnet nuget push ${{ env.NuGetDirectory }}/*.nupkg --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate

- name: Push snupkg
run: dotnet nuget push ${{ env.NuGetDirectory }}/*.snupkg --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
14 changes: 13 additions & 1 deletion EasyMonads/EasyMonads.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,24 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Version>2.2.0</Version>
<LangVersion>9</LangVersion>
</PropertyGroup>

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

<ItemGroup>
<PackageReference Include="MinVer" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup Label="MinVer">
<MinVerAutoIncrement>minor</MinVerAutoIncrement>
<MinVerDefaultPreReleaseIdentifiers>preview.0</MinVerDefaultPreReleaseIdentifiers>
<MinVerTagPrefix>v</MinVerTagPrefix>
</PropertyGroup>

</Project>
Loading