Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
Fix version regex github workflow

Add codeql code analysis workflow

Update github workflow

Fix license typo & linking

Fix assembly properties

Add dependabot github flow

Add nuget README

Update version

Move (fix) dependabot.yml

Update nuget and version

Update README.md
  • Loading branch information
rgomez90 committed Aug 17, 2022
1 parent b2d108b commit a0f2ee6
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 21 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '28 4 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
13 changes: 5 additions & 8 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: .NET Core
name: Build and publish on version change

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [ master ]

jobs:
build:
publish:
env:
NUGET_API_KEY:
runs-on: windows-latest
Expand All @@ -16,10 +16,7 @@ jobs:
- uses: actions/checkout@v2

- name: Setup .NET Core
uses: actions/setup-dotnet@v1

- name: Test
run: dotnet test --no-restore --verbosity normal
uses: actions/setup-dotnet@v1

- name: Publish Nuget on version change
uses: rohith/publish-nuget@v2
Expand All @@ -28,10 +25,10 @@ jobs:
PROJECT_FILE_PATH: TeamsHook.NET/TeamsHook.NET.csproj

# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
# VERSION_FILE_PATH: Directory.Build.props
VERSION_FILE_PATH: Directory.Build.props

# Regex pattern to extract version info in a capturing group
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
VERSION_REGEX: <Version>(.*)<\/Version>

# Flag to toggle git tagging, enabled by default
TAG_COMMIT: true
Expand Down
7 changes: 2 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<Project>
<PropertyGroup>
<Version>0.2.0-pre</Version>
<Version>0.2.0-pre3</Version>
<Product>TeamsHook.NET</Product>
<Description>.NET Client for sending messages to Microsoft Teams via Webhooks</Description>
<Company>Rafael Gómez</Company>
<Authors>Rafael Gómez</Authors>
<RepositoryUrl>https://github.com/rgomez90/TeamsHook.NET</RepositoryUrl>
<PackageTags>teams, microsoft, webhook, client</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/rgomez90/TeamsHook.NET</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>

<NeutralLanguage>en</NeutralLanguage>
<LangVersion>Latest</LangVersion>
<Features>strict</Features>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Rafael Gómez Díaz
Copyright (c) 2020 Rafael Gomez Diaz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![.NET Core](https://github.com/rgomez90/TeamsHook.NET/workflows/.NET%20Core/badge.svg) [![Nuget](https://img.shields.io/nuget/dt/TeamsHook.NET?label=NuGet&logo=nuget)](https://www.nuget.org/packages/TeamsHook.NET/)
[![Build and publish on version change](https://github.com/rgomez90/TeamsHook.NET/actions/workflows/dotnet.yml/badge.svg)](https://github.com/rgomez90/TeamsHook.NET/actions/workflows/dotnet.yml) [![Nuget](https://img.shields.io/nuget/dt/TeamsHook.NET?label=NuGet&logo=nuget)](https://www.nuget.org/packages/TeamsHook.NET/)

# TeamsHook.NET

Expand Down
16 changes: 11 additions & 5 deletions TeamsHook.NET.Tests/TeamsHook.NET.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0-preview.7.20364.11" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="coverlet.collector" Version="1.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0-preview-20220131-20" />
<PackageReference Include="System.Net.Http.Json" Version="6.0.2-mauipre.1.22102.15" />
<PackageReference Include="xunit" Version="2.4.2-pre.12" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 17 additions & 1 deletion TeamsHook.NET/TeamsHook.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,26 @@
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<TargetFrameworks>net5.0;net6.0;netcoreapp3.1;netstandard2.0</TargetFrameworks>
<LangVersion>default</LangVersion>
<PackageTags>teams, microsoft, webhook, client</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/rgomez90/TeamsHook.NET</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Text.Json" Version="6.0.2" />
</ItemGroup>

<ItemGroup>
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>

0 comments on commit a0f2ee6

Please sign in to comment.