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
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release NuGet package

on:
push:
tags:
- 'v*'

permissions:
id-token: write
contents: read

jobs:
release:
if: github.repository == 'btcpay-monero/monero-lws-csharp'
runs-on: ubuntu-latest
steps:

- name: Initialize
uses: actions/checkout@v5

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore

- name: Clean project
run: dotnet clean

- name: Get package version
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Build
run: dotnet build -c Release /p:Version=${{ env.VERSION }} --no-restore

- name: Deterministic build check and package creation
run: |
dotnet tool install --global dotnet-validate --version 0.0.1-preview.537
dotnet pack Monero.Lws/Monero.Lws.csproj -c Release /p:PackageVersion=${{ env.VERSION }} --no-build -o nuget-packages
dotnet validate package local nuget-packages/MoneroLwsNet.${{ env.VERSION }}.nupkg

- name: Upload NuGet package
uses: actions/upload-artifact@v4
with:
name: nuget-package-${{ github.sha }}
path: nuget-packages/MoneroLwsNet.${{ env.VERSION }}.nupkg

# Get a short-lived NuGet API key
- name: NuGet Login
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}

- name: Push package
run: dotnet nuget push nuget-packages/MoneroLwsNet.${{ env.VERSION }}.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{ steps.login.outputs.NUGET_API_KEY }}
15 changes: 15 additions & 0 deletions Monero.Lws/Monero.Lws.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,25 @@
<Product>Monero LWS CSharp library</Product>
<PackageId>MoneroLwsNet</PackageId>
<Description>The C# Monero Light Wallet Server library</Description>
<!-- version is taken from git tag when releasing -->
<Version Condition=" '$(Version)' == '' ">1.0.0</Version>
<Authors>The Btcpay-Monero Team</Authors>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<PackageProjectUrl>https://btcpay-monero.github.io/monero-lws-csharp/</PackageProjectUrl>
<RepositoryUrl>https://github.com/btcpay-monero/monero-lws-csharp</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>monero, lws</PackageTags>
<Company>btcpay-monero</Company>
<PackageIcon>logo.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>

<!-- Package logo -->
<ItemGroup>
<None Include="..\logo.png" Pack="true" PackagePath="\" />
</ItemGroup>

<!-- Deterministic build -->
<ItemGroup>
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.25" PrivateAssets="All" />
Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.