diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3d35a84 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,75 @@ +name: Release + +# Fires on any v*.*.* tag push (and prerelease suffixes -alpha/-beta/-rc). +# Version comes from Directory.Build.props. Publishes via NuGet Trusted +# Publishing (OIDC — no long-lived API key). Setup steps in docs/RELEASING.md. +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' + workflow_dispatch: + inputs: + dry_run: + description: "Pack and validate only — skip nuget push" + type: boolean + default: true + +jobs: + release: + runs-on: ubuntu-latest + environment: release + permissions: + contents: write # for creating the GitHub Release + id-token: write # required for Trusted Publishing OIDC exchange + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + global-json-file: global.json + + - name: Restore + run: dotnet restore shelldocs.slnx + + - name: Build + run: dotnet build shelldocs.slnx --configuration Release --no-restore + + - name: Test + run: dotnet test shelldocs.slnx --configuration Release --no-build --verbosity normal + + - name: Pack + run: dotnet pack shelldocs.slnx --configuration Release --no-build --output nupkgs + + - name: List produced packages + run: ls -la nupkgs/ + + # Runs immediately before push — the temp API key is valid only 1 hour. + # `user` is the nuget.org profile name (NOT email, NOT the GH org name), + # kept as a secret so it never lives in the workflow file. + - name: Login to NuGet via Trusted Publishing + if: github.event_name == 'push' || inputs.dry_run == false + id: nuget-login + uses: NuGet/login@v1 + with: + user: ${{ secrets.NUGET_USER }} + + - name: Push to NuGet + if: github.event_name == 'push' || inputs.dry_run == false + env: + NUGET_API_KEY: ${{ steps.nuget-login.outputs.NUGET_API_KEY }} + run: | + for pkg in nupkgs/*.nupkg; do + echo "Publishing $pkg" + dotnet nuget push "$pkg" \ + --api-key "$NUGET_API_KEY" \ + --source https://api.nuget.org/v3/index.json \ + --skip-duplicate + done + + - name: Create GitHub Release + if: github.event_name == 'push' + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + files: nupkgs/*.nupkg diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..140ef1d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,99 @@ +# Changelog + +All notable changes to ShellDocs land here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning is [SemVer](https://semver.org/spec/v2.0.0.html) with prerelease suffixes (`-alpha`, `-beta`, `-rc`) — the alpha window explicitly reserves the right to break APIs on minor bumps. + +## [Unreleased] + +## [0.1.0-alpha] — 2026-07-25 + +First public release. The whole Phase 1 target is shipped, plus most of Phase 2's primitives + consumer DX polish. See [ROADMAP.md](docs/ROADMAP.md). + +### Packages + +Published to NuGet: + +- `ShellDocs.CLI` — global tool: `dotnet tool install -g ShellDocs.CLI --prerelease`. Commands: `init`, `add`, `dev`, `build`, `preview` +- `ShellDocs.Components` — RCL with ``, ``, ``, ``, ``, ``, ``, content primitives, API-reference primitives +- `ShellDocs.Core` — navigation graph, search index model, routing helpers, markdown plain-text extractor +- `ShellDocs.Markdown` — Markdig pipeline with frontmatter, `razor:preview` fenced blocks, inline Razor component tags +- `ShellDocs.Templates` — starter markdown + Program.cs snippets for `shelldocs init` scaffolding +- `ShellDocs.Tokens` — RCL with `tokens.css` — shadcn-compatible palette + spacing scale, single source of truth for `--background`, `--foreground`, `--primary`, `--radius`, dark mode + +### Added + +**Markdown pipeline (`ShellDocs.Markdown`)** +- YAML frontmatter parsing via YamlDotNet +- ` ```razor:preview ` fenced blocks — live-rendered previews with source-view toggle +- Inline Razor component tags mid-markdown (``, ``) +- Component type registry (`RegisterComponent()`) with per-type tag aliases (`RegisterComponent