Skip to content

Publishing


プロジェクトがbuiltされたら、publishコマンドを使用して配布できます。

-p/--publisherオプションは、使用するパブリッシャーを制御します。デフォルトはindexです。

Artifact selection

デフォルトでは、プロジェクトのルートにあるdistディレクトリが使用されます。:

$ hatch publish
dist/hatch_demo-1rc0-py3-none-any.whl ... success
dist/hatch_demo-1rc0.tar.gz ... success

[hatch-demo]
https://pypi.org/project/hatch-demo/1rc0/

代わりに、引数として特定のパスを渡すことができます。:

hatch publish /path/to/artifacts foo-1.tar.gz

.whlまたは.tar.gzで終わるファイルのみがパブリッシュされます。

Further resources

パブリッシャープラグインreferenceを参照してください。

各見出しページがあります。

[authentication]に関するHow-Toがあります(how-to/publish/auth.md)

ターゲット[repository]を選択するオプション(how-to/publish/repo.md)。

publishコマンドは組み込みのプラグインとして実装されています。

planning your own plugin, read about the publisher plugin API.