Skip to content

Commit

Permalink
Migrates to .NET 8, Raven 6. Adds Github auto-publish to Nuget
Browse files Browse the repository at this point in the history
  • Loading branch information
JudahGabriel committed Jan 13, 2024
1 parent b327e06 commit aa73887
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 35 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: publish to nuget
on:
push:
branches:
- master # Default release branch
jobs:
publish:
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# - name: Setup dotnet
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 8.0.1

# Publish
- name: publish Nuget package on version change
id: publish_nuget
uses: alirezanet/publish-nuget@v3.1.0
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: Raven.Migrations/Raven.Migrations.csproj

# NuGet package id, used for version detection & defaults to project name
PACKAGE_NAME: RavenMigrations

# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
# VERSION_FILE_PATH: Directory.Build.props

# Regex pattern to extract version info in a capturing group
# VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$

# Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
# VERSION_STATIC: 1.0.0

# Flag to toggle git tagging, enabled by default
# TAG_COMMIT: true

# Format of the git tag, [*] gets replaced with actual version
# TAG_FORMAT: v*

# API key to authenticate with NuGet server
NUGET_KEY: ${{secrets.NUGET_TOKEN}}

# NuGet server uri hosting the packages, defaults to https://api.nuget.org
# NUGET_SOURCE: https://api.nuget.org

# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
# INCLUDE_SYMBOLS: false

# Flag to toggle not building the project and letting pack command handle restoring & building, disabled by default
# NO_BUILD: false
10 changes: 3 additions & 7 deletions Raven.Migrations.Sample/Raven.Migrations.Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="RavenDB.Client" Version="5.4.109" />
<PackageReference Include="RavenDB.Client" Version="6.0.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Raven.Migrations\Raven.Migrations.csproj" />
</ItemGroup>

</Project>
</Project>
12 changes: 4 additions & 8 deletions Raven.Migrations.Tests/Raven.Migrations.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>

<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="coverlet.collector" Version="1.2.0" />
<PackageReference Include="RavenDB.TestDriver" Version="5.4.109" />
<PackageReference Include="RavenDB.Client" Version="6.0.2" />
<PackageReference Include="RavenDB.TestDriver" Version="6.0.2" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Raven.Migrations\Raven.Migrations.csproj" />
</ItemGroup>

</Project>
</Project>
6 changes: 3 additions & 3 deletions Raven.Migrations.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30320.27
Expand All @@ -12,9 +12,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
readme.md = readme.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Migrations.Sample", "Raven.Migrations.Sample\Raven.Migrations.Sample.csproj", "{06F1A0C0-E4CD-460A-B332-487440F603DF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raven.Migrations.Sample", "Raven.Migrations.Sample\Raven.Migrations.Sample.csproj", "{06F1A0C0-E4CD-460A-B332-487440F603DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Migrations.Tests", "Raven.Migrations.Tests\Raven.Migrations.Tests.csproj", "{221A2856-09CA-4D59-A2F4-E961D37DD155}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raven.Migrations.Tests", "Raven.Migrations.Tests\Raven.Migrations.Tests.csproj", "{221A2856-09CA-4D59-A2F4-E961D37DD155}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
30 changes: 13 additions & 17 deletions Raven.Migrations/Raven.Migrations.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>5.0.1</Version>
<Version>6.0.0</Version>
<PackageId>RavenMigrations</PackageId>
<Authors>Darrel Portzline, Khalid Abuhakmeh, Judah Gabriel Himango</Authors>
<Company>BitShuva</Company>
<Description>Raven Migrations is a migration framework for RavenDB to help with updates to your database objects.</Description>
<Copyright>BitShuva 2022</Copyright>
<Product>RavenDB.Migrations</Product>
<PackageIconUrl></PackageIconUrl>
<PackageIconUrl>
</PackageIconUrl>
<PackageProjectUrl>https://github.com/migrating-ravens/RavenMigrations</PackageProjectUrl>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageLicenseUrl>
</PackageLicenseUrl>
<PackageTags>ravendb, nosql, migration, schema</PackageTags>
<PackageReleaseNotes>Allows supplying database name to operations.</PackageReleaseNotes>

<PackageReleaseNotes>PatchCollection allows for stale timeout</PackageReleaseNotes>
<!-- SourceLink support -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
Expand All @@ -24,25 +24,21 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>logo-for-nuget.png</PackageIcon>
<RepositoryUrl>https://github.com/migrating-ravens/RavenMigrations/</RepositoryUrl>

<nullable>enable</nullable>

<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.6" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.6" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="RavenDB.Client" Version="5.4.109" />
<PackageReference Include="RavenDB.Client" Version="6.0.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<None Include="logo-for-nuget.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
<PackagePath>
</PackagePath>
</None>
</ItemGroup>

</Project>
</Project>

0 comments on commit aa73887

Please sign in to comment.