Skip to content
This repository has been archived by the owner on Mar 1, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/0.5.0'
Browse files Browse the repository at this point in the history
* release/0.5.0:
  (maint) Fix footer for GRM
  (GH-33) Update TargetFrameworks
  (maint) Add VSCode settings file
  (GH-32) Prefer building on GHA
  (GH-31) Include pdb in nupkg
  (GH-30) Add CakeContrib.Guidelines package
  (maint) Fix copyright
  (GH-29) Remove DebugType
  (GH-29) Include symbols
  (GH-29) Enable deterministic builds
  (maint) Remove reference to packages.config
  (GH-28) Update to use Cake.Recipe 2.2.0
  (GH-27) Add workflow to build on GHA
  (GH-26) Add workflow to generate release notes
  (GH-25) Update GRM config
  (GH-22) Remove reference to Gitter
  • Loading branch information
gep13 committed Feb 19, 2021
2 parents f879b32 + fc65d35 commit a481cac
Show file tree
Hide file tree
Showing 17 changed files with 268 additions and 410 deletions.
8 changes: 4 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#---------------------------------#
# Build Image #
#---------------------------------#
image: Visual Studio 2017
image: Visual Studio 2019

#---------------------------------#
# Build Script #
#---------------------------------#
build_script:
- ps: .\build.ps1 -Target AppVeyor
- ps: .\build.ps1 -=target=CI

#---------------------------------#
# Tests
Expand Down Expand Up @@ -40,11 +40,11 @@ branches:
# Build Cache #
#---------------------------------#
cache:
- tools -> recipe.cake, tools/packages.config
- tools -> recipe.cake

#---------------------------------#
# Skip builds for doc changes #
#---------------------------------#
skip_commits:
# Regex for matching commit message
message: /(doc).*/
message: /\(doc\).*/
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"cake.tool": {
"version": "0.38.5",
"commands": [
"dotnet-cake"
]
}
}
}
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build

on:
push:
paths-ignore:
- "README.md"
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]

env:
AZURE_PASSWORD: ${{ secrets.AZURE_PASSWORD }}
AZURE_SOURCE: ${{ secrets.AZURE_SOURCE }}
AZURE_USER: ${{ secrets.AZURE_USER }}
GITHUB_PAT: ${{ secrets.GH_TOKEN }}
GITTER_ROOM_ID: ${{ secrets.GITTER_ROOM_ID }}
GPR_PASSWORD: ${{ secrets.GPR_PASSWORD }}
GPR_SOURCE: ${{ secrets.GPR_SOURCE }}
GPR_USER: ${{ secrets.GPR_USER }}
GITTER_TOKEN: ${{ secrets.GITTER_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
NUGET_SOURCE: "https://api.nuget.org/v3/index.json"
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
WYAM_ACCESS_TOKEN: ${{ secrets.WYAM_ACCESS_TOKEN }}
WYAM_DEPLOY_BRANCH: "gh-pages"
WYAM_DEPLOY_REMOTE: ${{ github.event.repository.html_url }}
steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Fetch all tags and branches
run: git fetch --prune --unshallow

- name: Cache Tools
uses: actions/cache@v2
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}

- name: Build project
uses: cake-build/cake-action@v1
with:
script-path: recipe.cake
target: CI
verbosity: Normal
cake-version: 0.38.5
cake-bootstrap: true

- name: Upload Issues-Report
uses: actions/upload-artifact@v2
with:
if-no-files-found: warn
name: issues
path: BuildArtifacts/report.html

- name: Upload Packages
uses: actions/upload-artifact@v2
with:
if-no-files-found: warn
name: package
path: BuildArtifacts/Packages/**/*
47 changes: 47 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Draft Release Notes

on:
workflow_dispatch:

jobs:
draft-stable:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
runs-on: ubuntu-latest

steps:
- name: Checkout the requested branch
uses: actions/checkout@v2.3.4
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- name: Cache Tools
uses: actions/cache@v2.1.4
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
- name: Set up git version
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
uses: gittools/actions/gitversion/setup@v0.9.9
with:
versionSpec: "5.x"
- name: Run git version
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.9
- name: Create release branch ${{ github.event.inputs.version }}
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
run: git switch -c release/${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Push new branch
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
uses: ad-m/github-push-action@v0.6.0
with:
branch: "release/${{ steps.gitversion.outputs.majorMinorPatch }}"
github_token: ${{ secrets.GH_TOKEN }}
- name: Drafting Release Notes
uses: cake-build/cake-action@v1
with:
script-path: recipe.cake
target: releasenotes
verbosity: Diagnostic
cake-version: 0.38.5
cake-bootstrap: true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ healthchecksdb

# Cake
tools/**
!tools/packages.config

# Build Related
BuildArtifacts/*
Expand Down
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableRoslynAnalyzers": true,
"[powershell]": {
"files.encoding": "utf8bom"
},
"powershell.codeFormatting.addWhitespaceAroundPipe": true
}
34 changes: 33 additions & 1 deletion GitReleaseManager.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,48 @@
issue-labels-include:
- Breaking change
- Feature
- Bug
- Feature
- Enhancement
- Improvement
- Documentation
- security
issue-labels-exclude:
- Build
- Internal / Refactoring
issue-labels-alias:
- name: Documentation
header: Documentation
plural: Documentation
- name: security
header: Security
plural: Security
create:
include-footer: true
footer-heading: Where to get it
footer-content: >
You can download this release from
[nuget](https://nuget.org/packages/Cake.DotNetTool.Module/{milestone}),
or you can just reference it in a cake build script
with `#module nuget:?package=Cake.DotNetTool.Module&version={milestone}`.
footer-includes-milestone: true
milestone-replace-text: "{milestone}"
include-sha-section: true
sha-section-heading: "SHA256 Hashes of the release artifacts"
sha-section-line-format: "- `{1}\t{0}`"
export:
include-created-date-in-title: true
created-date-string-format: yyyy-MM-dd
perform-regex-removal: true
regex-text: '[\r\n]*### Where to get it[\r\n]*You can .*`\.[\r\n]*'
multiline-regex: true
close:
use-issue-comments: true
issue-comment: |-
:tada: This issue has been resolved in version {milestone} :tada:
The release is available on:
- [GitHub Release](https://github.com/{owner}/{repository}/releases/tag/{milestone})
- [NuGet Package](https://www.nuget.org/packages/{repository}/{milestone})
Your **[GitReleaseManager](https://github.com/GitTools/GitReleaseManager)** bot :package::rocket:
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Cake.DotNetTool.Module is a Module for Cake, which extends it with a new IPackag

- [Documentation](https://cake-contrib.github.io/Cake.DotNetTool.Module)

## Chat Room
## Discussion

Come join in the conversation about Cake.DotNetTool.Module in our Gitter Chat Room.
If you have questions, search for an existing one, or create a new discussion on the Cake GitHub repository, using the `extension-q-a` category.

[![Join the chat at https://gitter.im/cake-contrib/Lobby](https://badges.gitter.im/cake-contrib/Lobby.svg)](https://gitter.im/cake-contrib/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join in the discussion on the Cake repository](https://img.shields.io/badge/GitHub-Discussions-green?logo=github)](https://github.com/cake-build/cake/discussions)

## Build

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<DebugType>full</DebugType>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="0.33.0" PrivateAssets="All" />
<PackageReference Include="Cake.Testing" Version="0.33.0" PrivateAssets="All" />
<PackageReference Include="coverlet.msbuild" Version="3.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="NSubstitute" Version="4.0.0" />
Expand Down
32 changes: 30 additions & 2 deletions Source/Cake.DotNetTool.Module/Cake.DotNetTool.Module.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DebugType>full</DebugType>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>Cake.DotNetTool.Module.ruleset</CodeAnalysisRuleSet>
Expand All @@ -11,8 +12,35 @@
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<StartYear>2016</StartYear>
<EndYear>$([System.DateTime]::Today.Year)</EndYear>
<FullYear Condition="'$(StartYear)'=='$(EndYear)'">$(StartYear)</FullYear>
<FullYear Condition="'$(StartYear)'!='$(EndYear)'">$(StartYear)-$(EndYear)</FullYear>

<!-- Properties related to packaging -->
<Authors>Gary Ewan Park</Authors>
<Copyright>Copyright © $(FullYear) — Cake Contributions</Copyright>
<Description>Cake Module that extends Cake with ability to install tools using dotnet cli.</Description>
<PackageIcon>icon.png</PackageIcon>
<PackageIconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/cake-contrib-medium.png</PackageIconUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/cake-contrib/Cake.DotNetTool.Module/</PackageProjectUrl>
<PackageTags>Cake;Script;Build;DotNetTool;Module</PackageTags>
<RepositoryUrl>https://github.com/cake-contrib/Cake.DotNetTool.Module.git</RepositoryUrl>
<PackageReleaseNotes>https://github.com/cake-contrib/Cake.DotNetTool.Module/releases/tag/$(Version)</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="0.33.0" PrivateAssets="All" />
<PackageReference Include="CakeContrib.Guidelines" Version="0.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
Binary file added Source/Cake.DotNetTool.Module/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions Source/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

<!-- This target must be imported into Directory.Build.targets -->
<!-- Workaround. Remove once we're targeting the 3.1.300+ SDK
https://github.com/dotnet/sourcelink/issues/572 -->
<Project>
<PropertyGroup>
<!-- Uncomment the following if you want to have pdb files embedded inside a nupkg package -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
</ItemGroup>
<ItemGroup>
<SourceRoot Include="$(NuGetPackageRoot)" />
</ItemGroup>

<Target Name="CoverletGetPathMap"
DependsOnTargets="InitializeSourceRootMappedPaths"
Returns="@(_LocalTopLevelSourceRoot)"
Condition="'$(DeterministicSourcePaths)' == 'true'">
<ItemGroup>
<_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
</ItemGroup>
</Target>
</Project>
Loading

0 comments on commit a481cac

Please sign in to comment.