Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 1,
"isRoot": true,
"tools": {
"GitVersion.Tool": {
"version": "6.3.0",
"commands": [
"dotnet-gitversion"
],
"rollForward": true
},
"fallout.globaltool": {
"version": "10.3.49",
"commands": [
"fallout"
],
"rollForward": true
}
}
}
105 changes: 105 additions & 0 deletions .fallout/build.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"Pack",
"Test"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"FalloutBuild": {
"properties": {
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"description": "Host for execution. Default is 'automatic'",
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
},
"Plan": {
"type": "boolean",
"description": "Shows the execution plan (HTML)"
},
"Profile": {
"type": "array",
"description": "Defines the profiles to load",
"items": {
"type": "string"
}
},
"Root": {
"type": "string",
"description": "Root directory during build execution"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"$ref": "#/definitions/ExecutableTarget"
}
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
}
}
}
},
"allOf": [
{},
{
"$ref": "#/definitions/FalloutBuild"
}
]
}
3 changes: 3 additions & 0 deletions .fallout/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"Solution": "Scrutor.Extensions.HttpClient.sln"
}
19 changes: 19 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Categorises the auto-generated GitHub Release notes by PR label
# (used by `generate_release_notes` in publish.yml).
changelog:
exclude:
labels:
- duplicate
- invalid
- wontfix
categories:
- title: ✨ Features & Enhancements
labels: [enhancement, feature]
- title: 🐛 Fixes
labels: [bug, fix]
- title: 📝 Documentation
labels: [documentation]
- title: 🔧 Maintenance & CI
labels: [chore, ci, cleanup, dependencies, iac]
- title: Other Changes
labels: ["*"]
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [GitHubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# fallout --generate-configuration GitHubActions_build --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: 'Cache: .fallout/temp, ~/.nuget/packages'
uses: actions/cache@v4
with:
path: |
.fallout/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
- name: 'Run: Test, Pack'
run: ./build.cmd Test Pack
57 changes: 0 additions & 57 deletions .github/workflows/publish-nuget.yml

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Publish on a version tag:
# 1. NuGet.org via Trusted Publishing (OIDC) — no stored API key.
# 2. GitHub Packages (uses the built-in GITHUB_TOKEN).
# 3. A GitHub Release with the .nupkg file attached and auto-generated,
# label-categorized release notes (see .github/release.yml).
#
# HAND-WRITTEN, documented exception: Fallout owns .github/workflows/build.yml
# (generated from the [GitHubActions] attribute — never hand-edit it), but the
# publish flow (OIDC trusted publishing + GitHub Packages + Release) is not
# expressible via the pinned Fallout 10.3.49 attribute API, so this workflow is
# maintained by hand. See CLAUDE.md.
#
# One-time nuget.org setup: a Trusted Publisher policy for the package
# (Scrutor.Extensions.HttpClient): owner Chrison-dev, repo
# Scrutor.Extensions.HttpClient, workflow publish.yml, environment nuget.org.
# Repo variable NUGET_USER = your nuget.org username.
#
# Triggered by pushing a version tag, e.g. `git tag v5.1.0 && git push origin v5.1.0`.
name: publish

on:
push:
tags: ['v*']
workflow_dispatch:

permissions:
id-token: write # OIDC trusted publishing (nuget.org)
contents: write # create the GitHub Release
packages: write # push to GitHub Packages

jobs:
publish:
runs-on: ubuntu-latest
environment: nuget.org
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # GitVersion needs full history

- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- name: 'Restore: dotnet tools'
run: dotnet tool restore

- name: 'Pack'
run: dotnet run --project build/_build.csproj -- Pack

- name: 'NuGet.org: trusted-publishing login (OIDC → short-lived key)'
uses: NuGet/login@v1
id: login
with:
user: ${{ vars.NUGET_USER }}

- name: 'NuGet.org: push'
run: >
dotnet nuget push "artifacts/packages/*.nupkg"
--source https://api.nuget.org/v3/index.json
--api-key ${{ steps.login.outputs.NUGET_API_KEY }}
--skip-duplicate

- name: 'GitHub Packages: push'
run: >
dotnet nuget push "artifacts/packages/*.nupkg"
--source https://nuget.pkg.github.com/Chrison-dev/index.json
--api-key ${{ secrets.GITHUB_TOKEN }}
--skip-duplicate

- name: 'GitHub Release: create with packages + generated notes'
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: artifacts/packages/*.nupkg
generate_release_notes: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -398,3 +398,7 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml

# Fallout build system
.fallout/temp/
artifacts/
Loading
Loading