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

Commit a481cac

Browse files
committed
Merge branch 'release/0.5.0'
* 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
2 parents f879b32 + fc65d35 commit a481cac

17 files changed

+268
-410
lines changed

.appveyor.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#---------------------------------#
22
# Build Image #
33
#---------------------------------#
4-
image: Visual Studio 2017
4+
image: Visual Studio 2019
55

66
#---------------------------------#
77
# Build Script #
88
#---------------------------------#
99
build_script:
10-
- ps: .\build.ps1 -Target AppVeyor
10+
- ps: .\build.ps1 -=target=CI
1111

1212
#---------------------------------#
1313
# Tests
@@ -40,11 +40,11 @@ branches:
4040
# Build Cache #
4141
#---------------------------------#
4242
cache:
43-
- tools -> recipe.cake, tools/packages.config
43+
- tools -> recipe.cake
4444

4545
#---------------------------------#
4646
# Skip builds for doc changes #
4747
#---------------------------------#
4848
skip_commits:
4949
# Regex for matching commit message
50-
message: /(doc).*/
50+
message: /\(doc\).*/

.config/dotnet-tools.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"cake.tool": {
6+
"version": "0.38.5",
7+
"commands": [
8+
"dotnet-cake"
9+
]
10+
}
11+
}
12+
}

.github/workflows/build.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- "README.md"
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
13+
strategy:
14+
matrix:
15+
os: [windows-latest, ubuntu-latest, macos-latest]
16+
17+
env:
18+
AZURE_PASSWORD: ${{ secrets.AZURE_PASSWORD }}
19+
AZURE_SOURCE: ${{ secrets.AZURE_SOURCE }}
20+
AZURE_USER: ${{ secrets.AZURE_USER }}
21+
GITHUB_PAT: ${{ secrets.GH_TOKEN }}
22+
GITTER_ROOM_ID: ${{ secrets.GITTER_ROOM_ID }}
23+
GPR_PASSWORD: ${{ secrets.GPR_PASSWORD }}
24+
GPR_SOURCE: ${{ secrets.GPR_SOURCE }}
25+
GPR_USER: ${{ secrets.GPR_USER }}
26+
GITTER_TOKEN: ${{ secrets.GITTER_TOKEN }}
27+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
28+
NUGET_SOURCE: "https://api.nuget.org/v3/index.json"
29+
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
30+
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
31+
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
32+
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
33+
WYAM_ACCESS_TOKEN: ${{ secrets.WYAM_ACCESS_TOKEN }}
34+
WYAM_DEPLOY_BRANCH: "gh-pages"
35+
WYAM_DEPLOY_REMOTE: ${{ github.event.repository.html_url }}
36+
steps:
37+
- name: Checkout the repository
38+
uses: actions/checkout@v2
39+
40+
- name: Fetch all tags and branches
41+
run: git fetch --prune --unshallow
42+
43+
- name: Cache Tools
44+
uses: actions/cache@v2
45+
with:
46+
path: tools
47+
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
48+
49+
- name: Build project
50+
uses: cake-build/cake-action@v1
51+
with:
52+
script-path: recipe.cake
53+
target: CI
54+
verbosity: Normal
55+
cake-version: 0.38.5
56+
cake-bootstrap: true
57+
58+
- name: Upload Issues-Report
59+
uses: actions/upload-artifact@v2
60+
with:
61+
if-no-files-found: warn
62+
name: issues
63+
path: BuildArtifacts/report.html
64+
65+
- name: Upload Packages
66+
uses: actions/upload-artifact@v2
67+
with:
68+
if-no-files-found: warn
69+
name: package
70+
path: BuildArtifacts/Packages/**/*

.github/workflows/release-notes.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Draft Release Notes
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
draft-stable:
8+
env:
9+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout the requested branch
14+
uses: actions/[email protected]
15+
- name: Fetch all tags and branches
16+
run: git fetch --prune --unshallow
17+
- name: Cache Tools
18+
uses: actions/[email protected]
19+
with:
20+
path: tools
21+
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
22+
- name: Set up git version
23+
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
24+
uses: gittools/actions/gitversion/[email protected]
25+
with:
26+
versionSpec: "5.x"
27+
- name: Run git version
28+
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
29+
id: gitversion
30+
uses: gittools/actions/gitversion/[email protected]
31+
- name: Create release branch ${{ github.event.inputs.version }}
32+
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
33+
run: git switch -c release/${{ steps.gitversion.outputs.majorMinorPatch }}
34+
- name: Push new branch
35+
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
36+
uses: ad-m/[email protected]
37+
with:
38+
branch: "release/${{ steps.gitversion.outputs.majorMinorPatch }}"
39+
github_token: ${{ secrets.GH_TOKEN }}
40+
- name: Drafting Release Notes
41+
uses: cake-build/cake-action@v1
42+
with:
43+
script-path: recipe.cake
44+
target: releasenotes
45+
verbosity: Diagnostic
46+
cake-version: 0.38.5
47+
cake-bootstrap: true

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ healthchecksdb
337337

338338
# Cake
339339
tools/**
340-
!tools/packages.config
341340

342341
# Build Related
343342
BuildArtifacts/*

.vscode/settings.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"omnisharp.enableEditorConfigSupport": true,
3+
"omnisharp.enableRoslynAnalyzers": true,
4+
"[powershell]": {
5+
"files.encoding": "utf8bom"
6+
},
7+
"powershell.codeFormatting.addWhitespaceAroundPipe": true
8+
}

GitReleaseManager.yaml

+33-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,48 @@
11
issue-labels-include:
22
- Breaking change
3-
- Feature
43
- Bug
4+
- Feature
5+
- Enhancement
56
- Improvement
67
- Documentation
78
- security
89
issue-labels-exclude:
910
- Build
11+
- Internal / Refactoring
1012
issue-labels-alias:
1113
- name: Documentation
1214
header: Documentation
1315
plural: Documentation
1416
- name: security
1517
header: Security
1618
plural: Security
19+
create:
20+
include-footer: true
21+
footer-heading: Where to get it
22+
footer-content: >
23+
You can download this release from
24+
[nuget](https://nuget.org/packages/Cake.DotNetTool.Module/{milestone}),
25+
or you can just reference it in a cake build script
26+
with `#module nuget:?package=Cake.DotNetTool.Module&version={milestone}`.
27+
footer-includes-milestone: true
28+
milestone-replace-text: "{milestone}"
29+
include-sha-section: true
30+
sha-section-heading: "SHA256 Hashes of the release artifacts"
31+
sha-section-line-format: "- `{1}\t{0}`"
32+
export:
33+
include-created-date-in-title: true
34+
created-date-string-format: yyyy-MM-dd
35+
perform-regex-removal: true
36+
regex-text: '[\r\n]*### Where to get it[\r\n]*You can .*`\.[\r\n]*'
37+
multiline-regex: true
38+
close:
39+
use-issue-comments: true
40+
issue-comment: |-
41+
:tada: This issue has been resolved in version {milestone} :tada:
42+
43+
The release is available on:
44+
45+
- [GitHub Release](https://github.com/{owner}/{repository}/releases/tag/{milestone})
46+
- [NuGet Package](https://www.nuget.org/packages/{repository}/{milestone})
47+
48+
Your **[GitReleaseManager](https://github.com/GitTools/GitReleaseManager)** bot :package::rocket:

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Cake.DotNetTool.Module is a Module for Cake, which extends it with a new IPackag
2525

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

28-
## Chat Room
28+
## Discussion
2929

30-
Come join in the conversation about Cake.DotNetTool.Module in our Gitter Chat Room.
30+
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.
3131

32-
[![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)
32+
[![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)
3333

3434
## Build
3535

Source/Cake.DotNetTool.Module.Tests/Cake.DotNetTool.Module.Tests.csproj

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
4+
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
55
<DebugType>full</DebugType>
6+
<IsPackable>false</IsPackable>
67
</PropertyGroup>
78

89
<ItemGroup>
910
<PackageReference Include="Cake.Core" Version="0.33.0" PrivateAssets="All" />
1011
<PackageReference Include="Cake.Testing" Version="0.33.0" PrivateAssets="All" />
12+
<PackageReference Include="coverlet.msbuild" Version="3.0.2">
13+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14+
<PrivateAssets>all</PrivateAssets>
15+
</PackageReference>
1116
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
17+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
18+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19+
<PrivateAssets>all</PrivateAssets>
20+
</PackageReference>
1221
<PackageReference Include="xunit" Version="2.4.1" />
1322
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
1423
<PackageReference Include="NSubstitute" Version="4.0.0" />
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>netstandard2.0</TargetFrameworks>
4-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
5-
<DebugType>full</DebugType>
4+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
5+
<IncludeSymbols>true</IncludeSymbols>
6+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
67
</PropertyGroup>
78
<PropertyGroup>
89
<CodeAnalysisRuleSet>Cake.DotNetTool.Module.ruleset</CodeAnalysisRuleSet>
@@ -11,8 +12,35 @@
1112
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
1213
</PropertyGroup>
1314

15+
<PropertyGroup>
16+
<StartYear>2016</StartYear>
17+
<EndYear>$([System.DateTime]::Today.Year)</EndYear>
18+
<FullYear Condition="'$(StartYear)'=='$(EndYear)'">$(StartYear)</FullYear>
19+
<FullYear Condition="'$(StartYear)'!='$(EndYear)'">$(StartYear)-$(EndYear)</FullYear>
20+
21+
<!-- Properties related to packaging -->
22+
<Authors>Gary Ewan Park</Authors>
23+
<Copyright>Copyright © $(FullYear) — Cake Contributions</Copyright>
24+
<Description>Cake Module that extends Cake with ability to install tools using dotnet cli.</Description>
25+
<PackageIcon>icon.png</PackageIcon>
26+
<PackageIconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/cake-contrib-medium.png</PackageIconUrl>
27+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
28+
<PackageProjectUrl>https://github.com/cake-contrib/Cake.DotNetTool.Module/</PackageProjectUrl>
29+
<PackageTags>Cake;Script;Build;DotNetTool;Module</PackageTags>
30+
<RepositoryUrl>https://github.com/cake-contrib/Cake.DotNetTool.Module.git</RepositoryUrl>
31+
<PackageReleaseNotes>https://github.com/cake-contrib/Cake.DotNetTool.Module/releases/tag/$(Version)</PackageReleaseNotes>
32+
</PropertyGroup>
33+
1434
<ItemGroup>
1535
<PackageReference Include="Cake.Core" Version="0.33.0" PrivateAssets="All" />
36+
<PackageReference Include="CakeContrib.Guidelines" Version="0.5.0">
37+
<PrivateAssets>all</PrivateAssets>
38+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
39+
</PackageReference>
40+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
41+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
42+
<PrivateAssets>all</PrivateAssets>
43+
</PackageReference>
1644
</ItemGroup>
1745

1846
</Project>
15.2 KB
Loading

Source/Directory.Build.targets

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
<!-- This target must be imported into Directory.Build.targets -->
3+
<!-- Workaround. Remove once we're targeting the 3.1.300+ SDK
4+
https://github.com/dotnet/sourcelink/issues/572 -->
5+
<Project>
6+
<PropertyGroup>
7+
<!-- Uncomment the following if you want to have pdb files embedded inside a nupkg package -->
8+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
9+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
10+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
11+
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
12+
</PropertyGroup>
13+
<ItemGroup>
14+
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
15+
</ItemGroup>
16+
<ItemGroup>
17+
<SourceRoot Include="$(NuGetPackageRoot)" />
18+
</ItemGroup>
19+
20+
<Target Name="CoverletGetPathMap"
21+
DependsOnTargets="InitializeSourceRootMappedPaths"
22+
Returns="@(_LocalTopLevelSourceRoot)"
23+
Condition="'$(DeterministicSourcePaths)' == 'true'">
24+
<ItemGroup>
25+
<_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
26+
</ItemGroup>
27+
</Target>
28+
</Project>

0 commit comments

Comments
 (0)