Skip to content

Commit

Permalink
feature: add sixpack
Browse files Browse the repository at this point in the history
  • Loading branch information
ikpil committed Sep 25, 2023
1 parent 5c5dfc5 commit c9cf188
Show file tree
Hide file tree
Showing 9 changed files with 181 additions and 20 deletions.
37 changes: 37 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
template: |
# What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION
categories:
- title: 'Changes'
labels:
- 'feature'
- 'feat'

- title: 'Bug Fixes'
labels:
- 'bug'
- 'fix'

version-resolver:
major:
labels:
- 'type: breaking'
minor:
labels:
- 'type: feature'
patch:
labels:
- 'type: bug'
- 'type: maintenance'
- 'type: docs'
- 'type: dependencies'
- 'type: security'

exclude-labels:
- 'skip-changelog'
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
dotnet-version: [ '7.0.x' ]
dotnet-version: [ '7.x' ]
os: [ windows-latest, ubuntu-latest, macos-latest ]

steps:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/on-tag-do-release.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

name: Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'

- name: restore dependencies
run: dotnet restore

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

- name: publish
run: dotnet publish src/DotFastLZ.SixPack -c Release --no-restore --no-self-contained --output working-temp

- name: version
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag}
major=${version%%.*}
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "major=${major}" >> $GITHUB_OUTPUT
- name: Zip
working-directory: ${{ env.working-directory }}
run: |
cp -rfv resources working-temp
cd working-temp
echo "dotnet DotFastLZ.SixPack.dll" > run.bat
zip -r ../DotFastLZ.SixPack-${{ steps.version.outputs.version}}.zip ./
if: success()

- uses: release-drafter/release-drafter@master
with:
version: ${{ steps.version.outputs.version }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: zip Upload
uses: softprops/action-gh-release@v1
with:
files: |
DotFastLZ.SixPack-${{ steps.version.outputs.version}}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


14 changes: 14 additions & 0 deletions DotFastLZ.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{87EE9A81-1
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotFastLZ.Compression.Tests", "test\DotFastLZ.Compression.Tests\DotFastLZ.Compression.Tests.csproj", "{FD482722-B4F3-4D05-8AAA-8EA228888C05}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotFastLZ.SixPack", "src\DotFastLZ.SixPack\DotFastLZ.SixPack.csproj", "{98630365-E9A4-4715-B08F-E6658FDD3155}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotFastLZ.SixPack.Tests", "test\DotFastLZ.SixPack.Tests\DotFastLZ.SixPack.Tests.csproj", "{0FEC3B0A-D900-4066-A652-25C392004B16}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -28,9 +32,19 @@ Global
{FD482722-B4F3-4D05-8AAA-8EA228888C05}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD482722-B4F3-4D05-8AAA-8EA228888C05}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD482722-B4F3-4D05-8AAA-8EA228888C05}.Release|Any CPU.Build.0 = Release|Any CPU
{98630365-E9A4-4715-B08F-E6658FDD3155}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{98630365-E9A4-4715-B08F-E6658FDD3155}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98630365-E9A4-4715-B08F-E6658FDD3155}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98630365-E9A4-4715-B08F-E6658FDD3155}.Release|Any CPU.Build.0 = Release|Any CPU
{0FEC3B0A-D900-4066-A652-25C392004B16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0FEC3B0A-D900-4066-A652-25C392004B16}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FEC3B0A-D900-4066-A652-25C392004B16}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0FEC3B0A-D900-4066-A652-25C392004B16}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{C20491BC-E472-4F09-B29C-DD7BF853C1C4} = {642F4CE7-0431-49D4-9BDE-E663C13C7792}
{FD482722-B4F3-4D05-8AAA-8EA228888C05} = {87EE9A81-1074-4466-AF83-6A059185A8E9}
{98630365-E9A4-4715-B08F-E6658FDD3155} = {642F4CE7-0431-49D4-9BDE-E663C13C7792}
{0FEC3B0A-D900-4066-A652-25C392004B16} = {87EE9A81-1074-4466-AF83-6A059185A8E9}
EndGlobalSection
EndGlobal
13 changes: 13 additions & 0 deletions src/DotFastLZ.SixPack/DotFastLZ.SixPack.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\DotFastLZ.Compression\DotFastLZ.Compression.csproj" />
</ItemGroup>

</Project>
13 changes: 13 additions & 0 deletions src/DotFastLZ.SixPack/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;

namespace DotFastLZ.SixPack;

public static class Program
{
public static int Main(string[] args)
{
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
return 0;
}
}
22 changes: 22 additions & 0 deletions test/DotFastLZ.SixPack.Tests/DotFastLZ.SixPack.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.7.0" />
<PackageReference Include="coverlet.collector" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\DotFastLZ.SixPack\DotFastLZ.SixPack.csproj" />
</ItemGroup>

</Project>
17 changes: 17 additions & 0 deletions test/DotFastLZ.SixPack.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using NUnit.Framework;

namespace DotFastLZ.SixPack.Tests;

public class Tests
{
[SetUp]
public void Setup()
{
}

[Test]
public void Test1()
{
Assert.Pass();
}
}

0 comments on commit c9cf188

Please sign in to comment.