英文:
Make packagist require github artifact (instead of commit)
问题
I'm using packagist.org to publish some custom php packages in order to be installable (or rather required) via composer
, but I have this some packages that require some build steps (for compiling CSS/JS).
The build process is done via github actions, on every tag release, and it spits a zip file. Like it is here: https://github.com/iamntz/carbon-fields-urlpicker/releases/latest
The goal here would be to have users to run composer require iamntz/carbon-fields-urlpicker
and use the carbon-fields-urlpicker.zip
within the release, not the git tag of that release.
Note that I'm aware of using composer by requiring the full URL of a zip. That's not what I'm looking, as it makes the installation process more cumbersome than it should.
I know that CSS/JS shouldn't sit into a php package, but it is what it is. If this changes anything, let's say we need to replace something on the PHP code before release.
英文:
I'm using packagist.org to publish some custom php packages in order to be installable (or rather required) via composer
, but I have this some packages that require some build steps (for compiling CSS/JS).
The build process is done via github actions, on every tag release, and it spits a zip file. Like it is here: https://github.com/iamntz/carbon-fields-urlpicker/releases/latest
The goal here would be to have users to run composer require iamntz/carbon-fields-urlpicker
and use the carbon-fields-urlpicker.zip
within the release, not the git tag of that release.
Note that I'm aware of using composer by requiring the full URL of a zip. That's not what I'm looking, as it makes the installation process more cumbersome than it should.
I know that CSS/JS shouldn't sit into a php package, but it is what it is. If this changes anything, let's say we need to replace something on the PHP code before release.
答案1
得分: 0
你可以在你的composer文件中实际指定dist
键,packagist将直接选择它!
你可以在这里看到它是如何工作的:
英文:
It seems that you can actually specify the ... dist
key into your composer file and packagist will just pick up that instead!
You can see it here how it works:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论