Skip to content

Commit

Permalink
Initial project. (#1)
Browse files Browse the repository at this point in the history
* First draft.

* First draft.

* Second draft.

* Clean up and docs.
  • Loading branch information
jscarle authored Feb 29, 2024
1 parent f98ce05 commit fe90306
Show file tree
Hide file tree
Showing 27 changed files with 2,086 additions and 392 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
7 changes: 7 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# .github/release.yml

changelog:
categories:
- title: Changes
labels:
- "*"
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docs

on:
push:
branches: ["main"]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Setup docfx
run: dotnet tool update -g docfx

- name: Build documentation
run: docfx ./docfx/docfx.json

- name: Upload documentation
uses: actions/upload-pages-artifact@v3
with:
path: './docfx/_site'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
55 changes: 55 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: 'csharp'

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.x

- name: Setup .NET 7.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x

- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal --framework net8.0

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
48 changes: 48 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish

on:
release:
types: [published]

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false

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

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.x

- name: Setup .NET 7.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x

- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Pack
run: dotnet pack --configuration Release --no-build --output .

- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
Loading

0 comments on commit fe90306

Please sign in to comment.