2.0.0rc5 #30
Workflow file for this run
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
name: Upload Python Package | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: abatilo/actions-poetry@v2 | |
- name: Bump version | |
run: | | |
version=${{ github.event.release.tag_name }} | |
poetry version $version | |
sed -i "s/__version__ = .*/__version__ = \'${version}\'/g" ./selene/__init__.py | |
- name: Commit version | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: '["pyproject.toml", "selene/__init__.py"]' | |
branch: 'master' | |
message: 'bump version up to ${{ github.event.release.tag_name }}' | |
- name: Build and publish to pypi | |
uses: JRubics/[email protected] | |
with: | |
pypi_token: ${{ secrets.PYPI_TOKEN }} |