-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create composer.json #11
Conversation
Thanks for the PR! If I understand it correctly, wpackagist.org only works for plugins from the official repo, right? Because the planet feed plugin is not in the repo. |
No, you can load plugins with a composer.json right from Github. Add this repository as a repository and require "repositories": [
{
"type": "github",
"url": "[email protected]:deworg/dewp-planet-feed"
}
],
"require": {
"deworg/dewp-planet-feed": ">=0.5.1",
}, |
The https://wpackagist.org repository is not needed. I removed it. |
Okay. I guess when a composer package is installed this way, it just uses the files directly from the repository, and there is no way to specify a release asset? Because the build step for the block editor script is done via GitHub Actions, and only the source files are in the repo.
|
You'are right. I have not thought about it here. I still tried to solve this problem for me. There is a Composer plugin GitHub Archive Installer which should be perfect here (and for my private themes/plugins) but I can't get it (or its forks) to work with Composer 2: https://github.com/wpscholar/github-archive-installer Another solution could be the Composer Asset Compiler from Inpsyde: https://github.com/inpsyde/composer-asset-compiler but it runs the build script on composer install/update. It should work but I would prefer the Archive Installer. Nevertheless, it would be nice if a composer.json was available. |
Just tried Composer Asset Compiler from Inpsyde and it works really well! Its even possible to use pre-compilation to download the assets right from the release |
Okay, cool. Could you provide an example for a |
I just run into an issue. The For my private plugins/themes I generate an additional |
I see nothing that speaks against that. Could you update the GitHub workflow as part of this PR and provide an example config that we can post in the readme or wiki so anyone who wants to install it via composer can use it? |
Any wishes how the asset.zip should be called? |
Just |
…rom Github Release
Done. Please proofread my Installation part of the README.md. |
I made a few small changes, could you verify that the changes make sense and still describe the composer process correctly? |
Maybe we need to switch to another action for the release asset (actions/upload-release-asset#78), but we will see after running it for the first time. |
Looks good!
I use https://github.com/JasonEtco/upload-to-release but last release Feb 2019... |
Thanks for the tip! |
And thanks again for the PR :) |
I just released a beta version with the modified GitHub action. I will test it and release the final version — I have no idea, why I have not released 0.5.2 last year 🙈 |
Add a composer.json to make it installable with composer