diff --git a/.gitattributes b/.gitattributes index 02a2eb7..e00b2be 100644 --- a/.gitattributes +++ b/.gitattributes @@ -42,3 +42,6 @@ # Razor files *.razor linguist-language=C# + +# The NuGet icon is packed from a plain checkout, so keep it out of LFS. +assets/icon.png !filter !diff !merge binary diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5772e33 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ +version: 2 +updates: + # Actions are pinned to commit SHAs; Dependabot keeps the SHA and the version comment in step. + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + groups: + actions: + patterns: ["*"] + + - package-ecosystem: nuget + directory: / + schedule: + interval: weekly + groups: + test-dependencies: + patterns: ["Microsoft.NET.Test.Sdk", "xunit*"] diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..8809ec7 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,34 @@ +name: CodeQL + +on: + pull_request: + branches: [master] + paths: + - 'src/**' + - '.github/workflows/codeql.yml' + schedule: + - cron: '17 6 * * 1' + workflow_dispatch: + +permissions: + contents: read + +jobs: + analyze: + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + steps: + - name: Checkout + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 + + # build-mode none analyzes C# from source, so no SDK setup or build is needed. + - name: Initialize CodeQL + uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 + with: + languages: csharp + build-mode: none + + - name: Analyze + uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 838ea7a..671d1e0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -44,10 +44,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 - name: Setup .NET - uses: actions/setup-dotnet@v5 + uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0 with: dotnet-version: | 8.0.x @@ -76,12 +76,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: fetch-depth: 0 - name: Setup .NET - uses: actions/setup-dotnet@v5 + uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0 with: dotnet-version: | 8.0.x @@ -183,7 +183,7 @@ jobs: - name: Log in to NuGet id: nuget - uses: NuGet/login@v1 + uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0 with: user: solrevdev diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0e03ee0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,74 @@ +# Changelog + +All notable changes to ytx are listed here. The format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow +[Semantic Versioning](https://semver.org/). GitHub Releases carry the full commit notes. + +## [Unreleased] + +### Added + +- NuGet package icon, symbols package (`.snupkg`) and SourceLink metadata. +- Dependabot for GitHub Actions and NuGet, and a CodeQL workflow. + +### Changed + +- GitHub Actions are pinned to commit SHAs. +- Tests run on .NET 8, 9 and 10. + +## [1.0.8] - 2026-10-08 + +### Changed + +- JSON uses source generation and streams to stdout, which makes startup faster and allocates less. +- Transcript building no longer allocates for every caption. +- Trim and AOT analyzers run in every build. + +## [1.0.7] - 2026-08-24 + +### Changed + +- Releases use NuGet Trusted Publishing instead of a stored API key. + +## [1.0.6] - 2026-07-16 + +### Added + +- Tests for command-line parsing and formatting. + +## [1.0.5] - 2026-07-16 + +### Added + +- `--help`, `--version`, `--url`, `--language`, `--metadata-only` and `--compact`. + +## [1.0.4] - 2026-07-16 + +### Changed + +- Modernized the NuGet publishing workflow. + +## [1.0.3] - 2025-11-17 + +### Added + +- .NET 10 target. + +### Changed + +- YoutubeExplode 6.5.6. + +## [1.0.1] - 2025-08-30 + +### Added + +- First release: title, description, raw transcript and Markdown transcript as JSON. + +[Unreleased]: https://github.com/solrevdev/solrevdev.ytx/compare/v1.0.8...HEAD +[1.0.8]: https://github.com/solrevdev/solrevdev.ytx/compare/v1.0.7...v1.0.8 +[1.0.7]: https://github.com/solrevdev/solrevdev.ytx/compare/v1.0.6...v1.0.7 +[1.0.6]: https://github.com/solrevdev/solrevdev.ytx/compare/v1.0.5...v1.0.6 +[1.0.5]: https://github.com/solrevdev/solrevdev.ytx/compare/v1.0.4...v1.0.5 +[1.0.4]: https://github.com/solrevdev/solrevdev.ytx/compare/v1.0.3...v1.0.4 +[1.0.3]: https://github.com/solrevdev/solrevdev.ytx/compare/v1.0.1...v1.0.3 +[1.0.1]: https://github.com/solrevdev/solrevdev.ytx/releases/tag/v1.0.1 diff --git a/README.md b/README.md index 36d8df8..a66e697 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ dotnet restore src/Ytx # Build dotnet build src/Ytx -c Release -# Run the unit tests +# Run the unit tests (on .NET 8, 9 and 10; add -f net8.0 to use one runtime) dotnet test tests/Ytx.Tests -c Release # Test locally (choose an installed target framework) @@ -182,6 +182,9 @@ dotnet tool install -g solrevdev.ytx --add-source ./nupkg ├── src/Ytx/Ytx.csproj # Package and target-framework metadata ├── tests/Ytx.Tests/ # CLI parsing and formatting unit tests ├── .github/workflows/publish.yml # Validation and release automation +├── .github/workflows/codeql.yml # CodeQL analysis +├── assets/icon.svg # Package icon source (icon.png is rendered from it) +├── CHANGELOG.md # Release history └── README.md # User and maintainer documentation ``` diff --git a/assets/icon.png b/assets/icon.png new file mode 100644 index 0000000..c366ae6 Binary files /dev/null and b/assets/icon.png differ diff --git a/assets/icon.svg b/assets/icon.svg new file mode 100644 index 0000000..e4edf59 --- /dev/null +++ b/assets/icon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/Ytx/Ytx.csproj b/src/Ytx/Ytx.csproj index a2f2f18..b2215a2 100644 --- a/src/Ytx/Ytx.csproj +++ b/src/Ytx/Ytx.csproj @@ -23,6 +23,13 @@ https://github.com/solrevdev/solrevdev.ytx MIT README.md + icon.png + + + true + true + snupkg + true ../../nupkg @@ -34,6 +41,7 @@ + diff --git a/tests/Ytx.Tests/Ytx.Tests.csproj b/tests/Ytx.Tests/Ytx.Tests.csproj index 927eecd..d6ffa8f 100644 --- a/tests/Ytx.Tests/Ytx.Tests.csproj +++ b/tests/Ytx.Tests/Ytx.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net8.0;net9.0;net10.0 enable enable false