Closed yamatokataoka closed 2 years ago
create release with GitHub Actions
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
for rl-human-prefs release
.github/workflows/release-rl-human-prefs.yml
name: Release rl-human-prefs
on:
push:
tags:
- "rl-human-prefs/*.*.*"
defaults:
run:
working-directory: rl-human-prefs
jobs:
build-and-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Build
run: poetry build
- name: Publish to TestPyPI
run: |
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry publish -r testpypi -u __token__ -p ${{ secrets.PYPI_TOKEN }}
https://python-poetry.org/docs/contributing/#git-workflow