Skip to content

Commit 29478c9

Browse files
authored
Merge pull request #30 from PromoFaux/refresh-some-bits
Various bits that could do with refreshing...
2 parents bc7f36c + f1be6b0 commit 29478c9

File tree

8 files changed

+124
-60
lines changed

8 files changed

+124
-60
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
tags:
7+
- '**'
8+
9+
jobs:
10+
build:
11+
12+
env:
13+
BUILD_CONFIG: 'Release'
14+
SOLUTION: 'Matterhook.NET.MatterhookClient.sln'
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
-
20+
name: Checkout Repo
21+
uses: actions/checkout@v2
22+
with:
23+
fetch-depth: 0 # To make GitVersion work (installed as dependency in project)
24+
-
25+
name: Setup NuGet
26+
uses: NuGet/setup-nuget@v1.0.5
27+
-
28+
name: Restore dependencies
29+
run: nuget restore $SOLUTION
30+
-
31+
name: Setup .NET
32+
uses: actions/setup-dotnet@v1
33+
with:
34+
dotnet-version: 5.0.x
35+
-
36+
name: Build
37+
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore
38+
-
39+
name: Publish
40+
if: github.event_name != 'pull_request'
41+
run: nuget push Matterhook.NET.MatterhookClient/bin/Release/*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}

.vscode/launch.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
// Use IntelliSense to find out which attributes exist for C# debugging
6+
// Use hover for the description of the existing attributes
7+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
8+
"name": ".NET Core Launch (console)",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build",
12+
// If you have changed target frameworks, make sure to update the program path.
13+
"program": "${workspaceFolder}/ManualTests/bin/Debug/net5.0/ManualTests.dll",
14+
"args": [],
15+
"cwd": "${workspaceFolder}/ManualTests",
16+
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
17+
"console": "internalConsole",
18+
"stopAtEntry": false
19+
},
20+
{
21+
"name": ".NET Core Attach",
22+
"type": "coreclr",
23+
"request": "attach"
24+
}
25+
]
26+
}

.vscode/tasks.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/ManualTests/ManualTests.csproj",
11+
"/property:GenerateFullPaths=true",
12+
"/consoleloggerparameters:NoSummary"
13+
],
14+
"problemMatcher": "$msCompile"
15+
},
16+
{
17+
"label": "publish",
18+
"command": "dotnet",
19+
"type": "process",
20+
"args": [
21+
"publish",
22+
"${workspaceFolder}/ManualTests/ManualTests.csproj",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary"
25+
],
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "watch",
30+
"command": "dotnet",
31+
"type": "process",
32+
"args": [
33+
"watch",
34+
"run",
35+
"${workspaceFolder}/ManualTests/ManualTests.csproj",
36+
"/property:GenerateFullPaths=true",
37+
"/consoleloggerparameters:NoSummary"
38+
],
39+
"problemMatcher": "$msCompile"
40+
}
41+
]
42+
}

ManualTests/ManualTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.1</TargetFramework>
5+
<TargetFramework>net5.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

Matterhook.NET.MatterhookClient.sln

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26730.10
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31521.260
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Matterhook.NET.MatterhookClient", "Matterhook.NET.MatterhookClient\Matterhook.NET.MatterhookClient.csproj", "{52ED8E2C-7DA3-4D7C-B14F-5AC25934ADB7}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DD13AC46-A75C-44CE-A48F-0ADF1D2A5A47}"
99
ProjectSection(SolutionItems) = preProject
10-
appveyor.yml = appveyor.yml
10+
.github\workflows\build.yml = .github\workflows\build.yml
1111
README.md = README.md
1212
EndProjectSection
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManualTests", "ManualTests\ManualTests.csproj", "{7A252949-3DCA-454C-9436-1A953C1FC734}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManualTests", "ManualTests\ManualTests.csproj", "{7A252949-3DCA-454C-9436-1A953C1FC734}"
1515
EndProject
1616
Global
1717
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Matterhook.NET.MatterhookClient/Matterhook.NET.MatterhookClient.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net452;net461;net471;netcoreapp1.0;netcoreapp2.1;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard20;netstandard21</TargetFrameworks>
55
<Authors>Promofaux, rgomez90</Authors>
66
<Company />
77
<Description>Simple HTTPclient to post messages to your Mattermost server</Description>
@@ -13,10 +13,14 @@
1313
<FileVersion>1.0.0.0</FileVersion>
1414
<Version>1.0.4-asdad-cxcxc-2</Version>
1515
<PackageId>Matterhook.NET.MatterhookClient</PackageId>
16-
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
16+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20+
<PackageReference Include="GitVersion.MsBuild" Version="5.7.0">
21+
<PrivateAssets>all</PrivateAssets>
22+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
23+
</PackageReference>
2024
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
2125
<PackageReference Include="System.Net.Http" Version="4.3.4" />
2226
</ItemGroup>

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build status](https://ci.appveyor.com/api/projects/status/76x60eg4vjve4vcf?svg=true)](https://ci.appveyor.com/project/PromoFaux/matterhook-net-matterhookclient) [![NuGet](https://img.shields.io/nuget/v/Matterhook.NET.MatterhookClient.svg)](https://www.nuget.org/packages/Matterhook.NET.MatterhookClient/)
1+
[![Build](https://github.com/PromoFaux/Matterhook.NET.MatterhookClient/actions/workflows/build.yml/badge.svg)](https://github.com/PromoFaux/Matterhook.NET.MatterhookClient/actions/workflows/build.yml) [![NuGet](https://img.shields.io/nuget/v/Matterhook.NET.MatterhookClient.svg)](https://www.nuget.org/packages/Matterhook.NET.MatterhookClient/)
22
[![NuGet](https://img.shields.io/nuget/dt/Matterhook.NET.MatterhookClient.svg)](https://www.nuget.org/packages/Matterhook.NET.MatterhookClient/)
33

44
# Matterhook.NET.MatterhookClient
@@ -18,7 +18,7 @@ Using this library is really easy. Just create a new MatterhookClient
1818
var client = new MatterhookClient("https://your.webhook.url/0892340923432");
1919
```
2020

21-
Create your message
21+
Create your message
2222

2323
```csharp
2424
var message = new MattermostMessage()
@@ -168,7 +168,7 @@ and clicking `Notify` will trigger a POST request to `https://matterhook.example
168168
```json
169169
{
170170
"user_id": "{userid}",
171-
"context": {
171+
"context": {
172172
"text": "New code was pushed."
173173
}
174174
}
@@ -218,6 +218,6 @@ You can add as many attachments of any type to a message as you want. Message me
218218
## Contributing
219219

220220
We welcome everyone who wants to contribute to this repo!
221-
Just open an issue with your intention or make a comment in some open issue you would like to work on.
221+
Just open an issue with your intention or make a comment in some open issue you would like to work on.
222222

223223
Please ensure that your Pull Requests are based on, and submitted against the development branch.

appveyor.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)