diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..45c25df --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,25 @@ +name: Publish Python 🐍 distributions 📦 to PyPI + +on: + release: + types: [published] + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install poetry + run: | + python -m pip install "poetry==1.1.15" + - name: Publish + env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + run: | + poetry config pypi-token.pypi $PYPI_TOKEN + poetry publish --build diff --git a/README.md b/README.md index f472aba..c7edc07 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,10 @@ poetry completions bash | sudo tee /etc/bash_completion.d/poetry.bash-completion ``` ## PyPIへの公開 +[GitHubのReleases](https://github.com/kurusugawa-computer/annofab-3dpc-editor-cli/releases)からリリースを作成してください。 +GitHub Actionsにより自動でPyPIに公開されます。 + +手動でPyPIに公開する場合は、以下のコマンドを実行してください。 ``` $ make publish