forked from carolynvs/Flurl.Signed
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from ellenfieldn/markdownlint
Add Markdownlint
- Loading branch information
Showing
6 changed files
with
120 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
root = true | ||
|
||
# Default settings | ||
[*] | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
# Xml project files | ||
[*.proj] | ||
indent_size = 2 | ||
|
||
# YAML files | ||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
# JSON files | ||
[*.{json,jsonc}] | ||
indent_size = 2 | ||
|
||
# Markdown files | ||
[*.md] | ||
# Double trailing spaces can be used for BR tags, and other instances are enforced by Markdownlint | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "markdownlint", | ||
"pattern": [ | ||
{ | ||
"regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"code": 4, | ||
"message": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Markdownlint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.md" | ||
- ".markdownlint.json" | ||
- ".github/workflows/markdownlint.yml" | ||
- ".github/workflows/markdownlint-problem-matcher.json" | ||
pull_request: | ||
paths: | ||
- "**/*.md" | ||
- ".markdownlint.json" | ||
- ".github/workflows/markdownlint.yml" | ||
- ".github/workflows/markdownlint-problem-matcher.json" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
statuses: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Run Markdownlint | ||
run: | | ||
echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json" | ||
npm i -g markdownlint-cli2 | ||
markdownlint-cli2 "**/*.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"default": true, | ||
"MD013": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"DavidAnson.vscode-markdownlint" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,55 @@ | ||
# Flurl.Signed | ||
Sometimes life isn't fair and you are stuck supporting the world as it existed 10+ years ago. So if you'd like to use the amazing [Flurl](http://tmenier.github.io/Flurl/), but for whatever reason are still using strong naming, I've signed and repackaged them for you. | ||
|
||
Sometimes life isn't fair and you are stuck supporting the world as it existed 10+ years ago. So if you'd like to use the amazing [Flurl](https://flurl.dev), but for whatever reason are still using strong naming, I've signed and repackaged them for you. | ||
|
||
Enjoy! | ||
|
||
**NuGet Packages** | ||
**NuGet Packages:** | ||
|
||
[Flurl.Signed](https://www.nuget.org/packages/Flurl.Signed)<br/> | ||
[Flulr.Http.Signed](https://www.nuget.org/packages/Flurl.Http.Signed) | ||
- [Flurl.Signed](https://www.nuget.org/packages/Flurl.Signed) | ||
- [Flulr.Http.Signed](https://www.nuget.org/packages/Flurl.Http.Signed) | ||
|
||
## Caveats | ||
* These are not built from source, they simply sign the existing assemblies on NuGet and publish them back to NuGet. | ||
|
||
- These are not built from source, they simply sign the existing assemblies on NuGet and publish them back to NuGet. | ||
|
||
## Acknowledgements | ||
* Todd Menier for developing Flurl. (https://github.com/tmenier) | ||
* Carolyn Van Slyck for developing the original version of Flurl.Signed. (https://github.com/carolynvs) | ||
|
||
- Todd Menier for developing Flurl. (<https://github.com/tmenier>) | ||
- Carolyn Van Slyck for developing the original version of Flurl.Signed. (<https://github.com/carolynvs>) | ||
|
||
## Roadmap | ||
|
||
I don't think I plan to do too much to this given that it already works, but some things that would be fun and make it more robust that I may be able to find time for: | ||
* Separate the nuget package generation from the uploading to the nuget repository. | ||
* Add verification of the nuget packages with sn.exe | ||
* Add integration tests to verify consumption of the nuget packages | ||
* Push based on results of verification and integration tests | ||
|
||
- Separate the nuget package generation from the uploading to the nuget repository. | ||
- Add verification of the nuget packages with sn.exe | ||
- Add integration tests to verify consumption of the nuget packages | ||
- Push based on results of verification and integration tests | ||
|
||
## How it works | ||
|
||
For anyone who wants to replicate this, here's how: | ||
|
||
### Generating a signing key | ||
|
||
1. Open Visual Studio Powershell as Administrator | ||
1. Run `sn -k Flurl.Signed.snk` | ||
1. Encode as base64 by running the command `certutil -encodehex -f .\Flurl.Signed.snk Flurl.Signed.encoded.txt 0x40000001` | ||
1. Add as Secret "NUGET_SIGNING_KEY" to github repo | ||
|
||
### Build Orchestration | ||
* Build Definition in VSTS | ||
* Get Sources from GitHub | ||
* Phase 1 - Defaults | ||
* Download Secure file - Downloads the signing key which was uploaded to VSTS | ||
* MSBuild | ||
* Project: build/build.proj | ||
* MSBuild Version: Latest | ||
* MSBuild Architecture: x86 | ||
* MSBuild Arguments: `/p:NugetApiKey=$(NugetApiKey)` | ||
* Variables: Need to define NugetApiKey as your Nuget Api Key. | ||
* Triggers: | ||
* When: Scheduled every day at 2am utc | ||
* Uncheck Only schedule builds if source or definition has changed | ||
|
||
- Build Definition in VSTS | ||
- Get Sources from GitHub | ||
- Phase 1 - Defaults | ||
- Download Secure file - Downloads the signing key which was uploaded to VSTS | ||
- MSBuild | ||
- Project: build/build.proj | ||
- MSBuild Version: Latest | ||
- MSBuild Architecture: x86 | ||
- MSBuild Arguments: `/p:NugetApiKey=$(NugetApiKey)` | ||
- Variables: Need to define NugetApiKey as your Nuget Api Key. | ||
- Triggers: | ||
- When: Scheduled every day at 2am utc | ||
- Uncheck Only schedule builds if source or definition has changed |