Skip to content

Commit

Permalink
Merge pull request #2 from InfinityFlowApp/1-setup-github-and-mvp
Browse files Browse the repository at this point in the history
Branding MVP
  • Loading branch information
snovak7 committed May 13, 2024
2 parents 4fe55ee + 3ea57e3 commit 82e734e
Show file tree
Hide file tree
Showing 19 changed files with 564 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# EditorConfig

[*]
charset = utf-8
trim_trailing_whitespace = true
tab_width = 2
indent_size = 2
indent_style = space
insert_final_newline = true
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
55 changes: 55 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
change-template: "- $TITLE by @$AUTHOR (#$NUMBER)"
no-changes-template: "- No changes"

prerelease: true
prerelease-identifier: rc

categories:
- title: "📚 Documentation"
labels:
- "documentation"
- title: "🚀 New Features"
labels:
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "bug"
- title: "🧰 Maintenance"
labels:
- "maintenance"
- title: "🚨 Security Updates"
labels:
- "security"
- title: "🔄 Dependency Updates"
collapse-after: 3
labels:
- "dependencies"

version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
template: |
$CHANGES
## 👨🏼‍💻 Contributors
$CONTRIBUTORS
autolabeler:
- label: "documentation"
files:
- "docs/**/*"
- label: "maintenance"
files:
- ".github/**/*"
- ".devcontainer/**/*"
- "test/**/*"
29 changes: 29 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request_target:
types:
- edited
- opened
- reopened
- synchronize
workflow_dispatch: {}

concurrency:
group: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref_type != 'tag' }}

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: "Draft Release"
uses: release-drafter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release

on:
pull_request: {}
push:
branches:
- main
release:
types:
- published
workflow_dispatch: {}

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
NUGET_DIR: ${{ github.workspace}}/nuget

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Setup .NET Core SDK 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
- name: Restore .NET Packages
run: dotnet restore

- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true

- name: Build .NET Solution
run: dotnet build --configuration Release --no-restore

- name: Pack .NET Solution
run: dotnet pack --configuration Release --no-build --output pack/
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}

- name: Publish .NET Solution to GitHub Packages
continue-on-error: true
run: dotnet nuget push pack/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}

- name: Publish .NET Solution to NuGet.org
env:
apikey: ${{ secrets.NUGET_ORG_KEY }}
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
run: dotnet nuget push pack/*.nupkg --api-key ${{ secrets.NUGET_ORG_KEY }} --source nuget
continue-on-error: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,4 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml
.idea/
21 changes: 21 additions & 0 deletions Branding.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{73C15AA6-8467-479E-852C-5884E5ADB397}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InfinityFlow.Tools.Branding", "src\Branding\InfinityFlow.Tools.Branding.csproj", "{79F92A34-B82B-4367-B562-3A00C38556D8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{79F92A34-B82B-4367-B562-3A00C38556D8} = {73C15AA6-8467-479E-852C-5884E5ADB397}
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{79F92A34-B82B-4367-B562-3A00C38556D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79F92A34-B82B-4367-B562-3A00C38556D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79F92A34-B82B-4367-B562-3A00C38556D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79F92A34-B82B-4367-B562-3A00C38556D8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
14 changes: 14 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project>
<PropertyGroup>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<IncludeSymbols>false</IncludeSymbols>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/InfinityFlowApp/tools-nuget-branding</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
8 changes: 8 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0"/>
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
branches:
master:
mode: ContinuousDeployment
tag: rc
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"rollForward": "latestMajor"
}
}
7 changes: 7 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
30 changes: 30 additions & 0 deletions src/Branding/InfinityFlow.Tools.Branding.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="InfinityFlow.Tools.Branding.props"/>
<PropertyGroup>
<DevelopmentDependency>true</DevelopmentDependency>
<Description>Provides default branding properties and assets for organization's NuGet projects.</Description>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IsPackable>true</IsPackable>
<NoWarn>$(NoWarn);NU5128;CS2008</NoWarn>
<Nullable>enable</Nullable>
<PackageTags>branding;defaults;icons;nuget;development</PackageTags>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<!-- TFM -->
<None Pack="true" PackagePath="build" Include="InfinityFlow.Tools.Branding.props" />
<None Pack="true" PackagePath="build" Include="InfinityFlow.Tools.Branding.targets" />
<!-- TFMs -->
<None Pack="true" PackagePath="buildMultiTargeting" Include="InfinityFlow.Tools.Branding.props" />
<None Pack="true" PackagePath="buildMultiTargeting" Include="InfinityFlow.Tools.Branding.targets" />
<!-- Transitive -->
<None Pack="true" PackagePath="buildTransitive" Include="InfinityFlow.Tools.Branding.props" />
<None Pack="true" PackagePath="buildTransitive" Include="InfinityFlow.Tools.Branding.targets" />
<!-- Assets -->
<None Pack="true" PackagePath="" Include="assets/packageIcon.png" />
<None Pack="true" PackagePath="" Include="$(SolutionDir)/LICENSE" />
<None Pack="true" PackagePath="" Include="$(SolutionDir)/README.md" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions src/Branding/InfinityFlow.Tools.Branding.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<Authors>InfinityFlow</Authors>
<PackageIcon>packageIcon.png</PackageIcon>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright © InfinityFlow</Copyright>
</PropertyGroup>
</Project>
7 changes: 7 additions & 0 deletions src/Branding/InfinityFlow.Tools.Branding.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<ItemGroup>
<None Pack="true" PackagePath="" Include="$(MSBuildThisFileDirectory)\..\packageIcon.png" Visible="false">
<Link>packageIcon.png</Link>
</None>
</ItemGroup>
</Project>
Loading

0 comments on commit 82e734e

Please sign in to comment.