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
21 changes: 21 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
changelog:
categories:
- title: Breaking Changes
labels:
- breaking-change
- title: Features
labels:
- enhancement
- feature
- title: Fixes
labels:
- bug
- bugfix
- title: Maintenance
labels:
- chore
- dependencies
- documentation
exclude:
labels:
- skip-changelog
47 changes: 30 additions & 17 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
# This is a basic workflow to help you get started with Actions
name: Release

name: Build & Publish to NuGet

# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
release:
types:
- published

permissions:
contents: read

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
publish-nuget:
runs-on: ubuntu-latest
env:
solution: WordPressPCL.sln
project: WordPressPCL/WordPressPCL.csproj
release_tag: ${{ github.event.release.tag_name }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
- name: Build & Package
- name: Validate release tag
id: version
run: |
cd WordPressPCL
dotnet pack -c Release -o out
- name: PushNuget
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{secrets.WORDPRESSPCLNUGET}} --skip-duplicate
version="${release_tag#v}"
if [[ ! "$release_tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.-]+)?$ ]]; then
echo "Release tag '$release_tag' must use the format v<major>.<minor>.<patch>[-suffix]."
exit 1
fi
echo "value=$version" >> "$GITHUB_OUTPUT"
- name: Restore
run: dotnet restore ${{ env.solution }} --disable-parallel
- name: Build
run: dotnet build ${{ env.solution }} -c Release --no-restore -p:Version=${{ steps.version.outputs.value }}
- name: Pack
run: dotnet pack ${{ env.project }} -c Release --no-build -o artifacts -p:Version=${{ steps.version.outputs.value }}
- name: Publish to NuGet
run: dotnet nuget push "artifacts/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.WORDPRESSPCLNUGET }} --skip-duplicate
251 changes: 251 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
# Changelog

All notable changes to this project will be documented in this file.
Comment thread
ThomasPe marked this conversation as resolved.

The project now uses GitHub Releases as the source of truth for versioned release notes. Create releases with tags like `v3.0.1` or `v3.1.0-rc.1` and keep this changelog in sync with the published release.

## [Unreleased]

### Changed

- Placeholder for upcoming changes before the next GitHub release is published.

## [3.0.0]

### Changed

- Target .NET 10.
- Dropped previous .NET Standard and .NET 6 test targets.

## [2.1.0]

### Changed

- Upgraded dependencies.
- Fixed `GetCurrentUserAsync()` naming.
- Allowed `HttpClient` injection without a base address.
- Added optional `ignoreDefaultPath` on `CustomRequest` methods.

## [2.0.2]

### Added

- Support for plugins.
- Support for statuses in `UsersQueryBuilder`.

### Changed

- Upgraded `Newtonsoft.Json` to 13.0.3.

## [2.0.1]

### Changed

- Upgraded `Newtonsoft.Json` to 13.0.1.

## [2.0.0]

### Added

- `WordPressClient` accepts the endpoint as a `Uri`.
- Support for getting the total post count without fetching the posts.
- Generic JWT and Basic Auth support.

### Changed

- Dropped `netstandard1.x` support.
- Added the `Async` suffix to all public async methods.
- Moved auth-related functionality to the auth sub-client.
- Moved settings functionality to the settings sub-client.

### Fixed

- Improved error handling for `WP_DEBUG_DISPLAY`.

## [1.9.0]

### Added

- Support for application passwords.

### Changed

- Raised the minimum target from `netstandard1.1` to `netstandard1.3`.

## [1.8.5]

### Fixed

- Query builder now appends default enum values to the query string for easier debugging.

## [1.8.4]

### Fixed

- `HttpClient` injection.

## [1.8.2]

### Added

- Support for the JWT Auth plugin.

## [1.7.2]

### Added

- Support for posts trash status.
- Support for providing an `HttpClient` to `WordPressClient`.

## [1.7.1]

### Added

- Package icon.

### Changed

- Updated the license expression.

## [1.7.0]

### Added

- Optional MIME type override for media upload.

### Changed

- Improved handling of `HttpClient` headers.
- Downgraded JSON.NET to 11.0.1.
- Refactored exceptions.

## [1.6.2]

### Added

- `.kmz` and `.kml` MIME types (#162).

### Fixed

- Cleaned up the file stream after upload (#166).

## [1.6.1]

### Fixed

- `Capabilities` can now contain strings instead of only booleans (#147).

## [1.6.0-beta1]

### Changed

- Marked all `Meta` properties as dynamic because the structure can be volatile.

## [1.5.1]

### Fixed

- `MediaSizes` height and width are now optional (#143).

## [1.5.0]

### Fixed

- Enhanced error handling.
- Addressed issue [#138](https://github.com/wp-net/WordPressPCL/issues/138).

## [1.4.6]

### Fixed

- Added `DefaultValueHandling` to the comment status property.

## [1.4.5]

### Fixed

- Added `NullValueHandling` to `FeaturedMedia`.

## [1.4.4]

### Added

- Yoast taxonomy terms.

## [1.4.3]

### Fixed

- Added default serializer settings with `MissingMemberHandling.Ignore`.

## [1.4.2]

### Fixed

- Delete requests now return `bool` instead of `HttpResponseMessage`.

## [1.4.1-alpha]

### Added

- Experimental WordPress.com support (read-only).
- Experimental descending threaded comments support.

## [1.4.0]

### Changed

- Made `HttpClient` static.

### Fixed

- Exceptions are now thrown instead of being hidden.
- Stopped auto-appending `/wp-json` to the WordPress URI.

## [1.3.3]

### Fixed

- Updating `Comment.Status`.

## [1.3.2]

### Fixed

- `Comment.Status` handling.

## [1.3.1]

### Added

- `maxDepth` option for threaded comments.

## [1.3.0]

### Added

- `ToThreaded` method for transforming comments.
- `.NET Standard 2.0` support.
- Uploading media directly from a file path (`.NET Standard 2.0` only).

### Changed

- Passed deserialization settings into `HttpHelper`.

## [1.2.1]

### Added

- JWT getter and setter methods.

## [1.2.0]

### Added

- Helper method to sort comments for a threaded view.
- Method to get all comments for a post id.
- Logout method.

### Fixed

- Improved async performance in several code paths.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ The WordPressPCL API Wrapper is avaiable through [NuGet](https://www.nuget.org/p
> Install-Package WordPressPCL
```

## Release Process

WordPressPCL uses GitHub Releases as the source of truth for publishing new package versions.

1. Update [CHANGELOG.md](CHANGELOG.md) with the release highlights.
2. Create a GitHub release with a `vX.Y.Z` tag (or `vX.Y.Z-suffix` for pre-releases) and GitHub-generated release notes.
3. Publishing that release triggers the NuGet workflow, which builds and publishes the same version to NuGet.

## Runtime Requirement
WordPressPCL 3.0 targets .NET 10 only. Upgrading from 2.x is a breaking change and requires applications and test environments to move to the .NET 10 SDK/runtime before restoring, building, or running tests.

Expand Down
Loading
Loading