add path to install rye #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Follow this instruction | |
# https://packaging.python.org/ja/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
name: Publish | |
on: | |
push: | |
# tags: '[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install rye | |
shell: bash | |
run: | | |
curl -sSf https://rye-up.com/get | RYE_INSTALL_OPTION="--yes" bash | |
echo "$HOME/.rye/shims" >> $GITHUB_PATH | |
- name: Build | |
run: | | |
rye build | |
- name: Publish distribution to Test PyPI | |
run: | | |
rye publish --repository testpypi --repository-url https://test.pypi.org/legacy/ \ | |
--token ${{ secrets.TEST_PYPI_API_TOKEN }} --yes | |
- name: Publish distribution to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
run: | | |
rye publish --token ${{ secrets.PYPI_API_TOKEN }} --yes |