Skip to content

Commit

Permalink
Update ci to use dotnet-releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Feb 28, 2022
1 parent 49ed9b3 commit 70d2eec
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 28 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/managed.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: managed

env:
PROJECT_NAME: Blake3

on:
push:
paths-ignore:
Expand All @@ -19,25 +16,16 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: Build & test (Release)
run: dotnet test src -c Release

- name: Pack
run: |
dotnet pack src -c Release
- name: Publish
if: github.event_name == 'push'
- name: Build, Test, Pack, Publish
run: |
if ( "${{github.ref}}" -match "^refs/tags/[0-9]+\.[0-9]+\.[0-9]+" ) {
dotnet nuget push src\${{env.PROJECT_NAME}}\bin\Release\*.nupkg -s nuget.org -k ${{secrets.NUGET_TOKEN}}
} else {
echo "publish is only enabled by tagging with a release tag"
}
dotnet tool install -g dotnet-releaser
dotnet-releaser run --nuget-token ${{secrets.NUGET_TOKEN}} --github-token ${{secrets.GITHUB_TOKEN}} src/dotnet-releaser.toml
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ _TeamCity*
!.axoCover/settings.json

# Coverlet is a free, cross platform Code Coverage Tool
coverage*[.json, .xml, .info]
coverage.*[.json, .xml, .info]

# Visual Studio code coverage results
*.coverage
Expand Down Expand Up @@ -363,3 +363,10 @@ MigrationBackup/
# Rust
/lib/blake3_dotnet/target
Cargo.lock

# Tmp folders
tmp/
[Tt]emp/

# Remove artifacts produced by dotnet-releaser
artifacts-dotnet-releaser/
4 changes: 2 additions & 2 deletions src/Blake3.Tests/Blake3.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<Content Include="..\Blake3\runtimes\$(RuntimeIdentifier)\native\*.*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
5 changes: 2 additions & 3 deletions src/Blake3/Blake3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
</ItemGroup>

<ItemGroup>
<AssemblyMetadataCommand Remove="GitDescription" />
<PackageReference Include="MSBuildGitHash" Version="2.0.2">
<PackageReference Include="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!--Add support for sourcelink-->
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.*" PrivateAssets="All" />
Expand Down
4 changes: 0 additions & 4 deletions src/Blake3/Blake3.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
<Description>Blake3.NET is a managed wrapper around the Rust implementations of the BLAKE3 cryptographic hash function.</Description>
<Copyright>Alexandre Mutel</Copyright>
<NeutralLanguage>en-US</NeutralLanguage>
<VersionPrefix>0.5.1</VersionPrefix>
<!--<VersionSuffix>alpha</VersionSuffix>
<BuildNumber>9</BuildNumber>
<VersionSuffix Condition="'$(VersionSuffix)' != '' AND '$(BuildNumber)' != ''">$(VersionSuffix).$(BuildNumber)</VersionSuffix>-->
<Authors>Alexandre Mutel</Authors>
<PackageTags>Blake3; Hash; Cryptography; SIMD</PackageTags>
<PackageReleaseNotes>https://github.com/xoofx/Blake3.NET/blob/master/changelog.md</PackageReleaseNotes>
Expand Down
6 changes: 6 additions & 0 deletions src/dotnet-releaser.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# configuration file for dotnet-releaser
[msbuild]
project = "./Blake3.NET.sln"
[github]
user = "xoofx"
repo = "Blake3.NET"

0 comments on commit 70d2eec

Please sign in to comment.