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
3 changes: 2 additions & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"version": "6.3.0",
"commands": [
"dotnet-gitversion"
]
],
"rollForward": false
}
}
}
113 changes: 113 additions & 0 deletions .fallout/build.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"$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": [
"Generate",
"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"
},
"BuildProjectFile": {
"type": [
"null",
"string"
],
"description": "Path to the build project (.csproj) relative to the repository root. Defaults to 'build/_build.csproj' when unset. Read by the Fallout global tool's in-tool runner."
}
}
}
},
"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": "TvdbApi.sln"
}
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# ------------------------------------------------------------------------------
# <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: 'Setup: .NET SDK'
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: 'Restore: dotnet tools'
run: dotnet tool restore
- name: 'Run: Test, Pack'
run: dotnet run --project build/_build.csproj -- Test Pack
- name: 'Publish: test-results'
uses: actions/upload-artifact@v5
with:
name: test-results
path: artifacts/test-results
- name: 'Publish: packages'
uses: actions/upload-artifact@v5
with:
name: packages
path: artifacts/packages
83 changes: 0 additions & 83 deletions .github/workflows/code-coverage.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Publish to NuGet.org via Trusted Publishing (OIDC) — no stored API key.
#
# Requires a one-time Trusted Publisher policy on nuget.org for each package
# (TvdbClient, TvdbClient.Models, TvdbClient.Abstractions): owner Chrison-dev,
# repo TvdbApi, workflow publish.yml, environment nuget.org. Set the repo variable
# NUGET_USER to your nuget.org username.
#
# Triggered by pushing a version tag, e.g. `git tag v4.7.11 && git push origin v4.7.11`.
name: publish

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

permissions:
id-token: write # required for OIDC trusted publishing
contents: read

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: trusted-publishing login (OIDC → short-lived key)'
uses: NuGet/login@v1
id: login
with:
user: ${{ vars.NUGET_USER }}

- name: 'NuGet: 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
Loading
Loading