Skip to content

Commit

Permalink
Merge pull request #7 from ghost1face/actions
Browse files Browse the repository at this point in the history
Github Actions
  • Loading branch information
ghost1face authored Jan 18, 2022
2 parents 853651b + 077a112 commit b241c1c
Show file tree
Hide file tree
Showing 42 changed files with 73 additions and 33 deletions.
9 changes: 3 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ root = true

[*]
indent_style = space
indent_size = 2
insert_final_newline = true

# Code files
[*.{cs}]
indent_size = 4
insert_final_newline = true

[*.{js, json}]
indent_size = 2
insert_final_newline = true
indent_size = 4
31 changes: 31 additions & 0 deletions .github/workflows/dotnet-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Upload dotnet package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x' # SDK Version to use.
- name: Build
working-directory: ./src
run: dotnet build --configuration Release .
- name: Create the package
working-directory: ./src
run: dotnet pack --configuration Release .
- name: Publish the package to nuget.org
working-directory: ./src
run: dotnet nuget push FileTypeInterrogator/bin/Release/FileTypeInterrogator.*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}}
17 changes: 15 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,26 @@ jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Clean
run: rm -rf *.*
- uses: actions/checkout@v2
- name: Setup .NET
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.1.x'
- name: Restore dependencies
working-directory: ./src
run: dotnet restore
Expand Down
43 changes: 21 additions & 22 deletions src/FileTypeInterrogator.Tests/FileTypeInterrogator.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="1.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="1.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FileTypeInterrogator\FileTypeInterrogator.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="TestFiles\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FileTypeInterrogator\FileTypeInterrogator.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="TestFiles\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/FileTypeInterrogator/FileTypeInterrogator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@
</EmbeddedResource>
</ItemGroup>

</Project>
</Project>
4 changes: 2 additions & 2 deletions src/FileTypeInterrogator/definitions_flat
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
0 long 47 Tab Separated Values File tsv text/tab-separated-values
0 long 0001000000 TrueType Font ttf application/font-sfnt
0 long 454E5452595643440200000102001858 Virtual CD vcd application/x-cdlink
0 long 424547494E3A56434152440D0A vCard File vcf text/vcard
0 long 424547494E3A5643415244 vCard File vcf text/vcard
0 long 52494646 57415645666D7420 WAVE Audio File wav audio/x-wav
0 long 1A45DFA3 WebM Video File webm video/webm
0 long 52494646 WebP Image webp image/webp
Expand Down Expand Up @@ -234,4 +234,4 @@
0 long 504B0708 Zipped File zip application/zip
30 long 504B4C495445 Zipped File zip application/zip
526 long 504B537058 Zipped File zip application/zip
29152 long 57696E5A6970 Zipped File zip application/zip
29152 long 57696E5A6970 Zipped File zip application/zip

0 comments on commit b241c1c

Please sign in to comment.