Skip to content

Commit

Permalink
Merge pull request #19 from ellenfieldn/markdownlint
Browse files Browse the repository at this point in the history
Add Markdownlint
  • Loading branch information
ellenfieldn authored May 21, 2024
2 parents d3c256e + a2a5e52 commit 9a3444c
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 24 deletions.
25 changes: 25 additions & 0 deletions .editorconfig
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
17 changes: 17 additions & 0 deletions .github/workflows/markdownlint-problem-matcher.json
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
}
]
}
]
}
37 changes: 37 additions & 0 deletions .github/workflows/markdownlint.yml
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"
4 changes: 4 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"default": true,
"MD013": false
}
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"DavidAnson.vscode-markdownlint"
]
}
56 changes: 32 additions & 24 deletions README.md
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

0 comments on commit 9a3444c

Please sign in to comment.