forked from yashaka/selene
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
publish to pypi with github-ci with auto-bumping version yashaka#246
- Loading branch information
1 parent
1e0fced
commit 49950f3
Showing
4 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Upload Python Package | ||
on: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
- uses: abatilo/actions-poetry@v2.1.0 | ||
|
||
- 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@v7.1.2 | ||
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/poetry-publish@v1.5 | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} |
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
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
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