Skip to content

Conversation

@justlevine
Copy link
Contributor

What

This PR adds a GitHub workflow to create a distribution build of the plugin, and attach it to the GitHub release.

Why

Provides closure on distribution methods:

  1. Download and install manually from the latest release: https://github.com/WordPress/abilities-api/releases/latest
  2. Download and install with wp-cli: wp plugin install https://github.com/WordPress/abilities-api/releases/latest/download/abilities-api.zip
  3. Require with composer:
     {
       "repositories": [
         {
           "type": "vcs",
           "url": "https://github.com/WordPress/abilities-api.git"
         }
       ],
     }
    composer require wordpress/abilities-api --save

To Test

  1. Replace wordpress/abilities-api with my fork: justlevine/abilities-api
  2. Workflow https://github.com/justlevine/abilities-api/actions/runs/17013511598/job/48232662144

@gziolo gziolo added the [Tool] Issues related to development tooling, such as linting, testing, or CI label Aug 18, 2025
@codecov
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (trunk@fffa13a). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff            @@
##             trunk      #24   +/-   ##
========================================
  Coverage         ?   92.48%           
  Complexity       ?       99           
========================================
  Files            ?        7           
  Lines            ?      519           
  Branches         ?        0           
========================================
  Hits             ?      480           
  Misses           ?       39           
  Partials         ?        0           
Flag Coverage Δ
unit 92.48% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gziolo
Copy link
Member

gziolo commented Aug 19, 2025

This PR adds a GitHub workflow to create a distribution build of the plugin, and attach it to the GitHub release.

I'm not entirely sure whether we plan to distribute the plugin in the WordPress registry. @Jameswlepage, do you know how this repo is going to be consumed in the long run outside of using npm and composer packages?

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still might be useful to offer a downladable zip file with the plugin for testing so I'm approving the changes.

@justlevine
Copy link
Contributor Author

justlevine commented Aug 19, 2025

This PR adds a GitHub workflow to create a distribution build of the plugin, and attach it to the GitHub release.

I'm not entirely sure whether we plan to distribute the plugin in the WordPress registry.

@gziolo just to confirm - nothing in this PR is connected to submitting this as a .org plugin, and with a 6.9 merge goal, my assumption too is that we're not planning to submit.

It still might be useful to offer a downladable zip file with the plugin for testing

Exactly this.

Goal is to attach the dist builds to the GitHub releases to order to composer/wpcli/manual users and testers to require/download/install the dist version without the bundled tests/CI/config files.

In MCP Adapter, I'm recommending installing the dist version (now it users the source) in via wp-env.json, while if we stick with the initial bash approach, it would probably use the dist zip via a wpcli call.

@gziolo gziolo enabled auto-merge (squash) August 19, 2025 11:29
@gziolo
Copy link
Member

gziolo commented Aug 19, 2025

Cool, I resolved merge conflicts and enabled auto-merge 🚀

@gziolo gziolo merged commit f36c71f into WordPress:trunk Aug 19, 2025
15 checks passed
@justlevine justlevine deleted the ci/release-flow branch August 19, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Tool] Issues related to development tooling, such as linting, testing, or CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants