This repository has been archived by the owner on Nov 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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 when releases are created on Github (#75)
* Publish to PyPI when releases are created on Github * Update readme
- Loading branch information
1 parent
7a1ac22
commit ebed649
Showing
4 changed files
with
41 additions
and
7 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,30 @@ | ||
name: CI | ||
|
||
on: | ||
release: | ||
types: [ created ] | ||
|
||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
|
||
jobs: | ||
test: | ||
name: Publish to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install test dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry==1.1.3 | ||
- name: Install Dependencies | ||
run: poetry install | ||
- name: Publish to PyPI | ||
run: | | ||
poetry config pypi-token.pypi ${{ PYPI_TOKEN }} | ||
bash scripts/publish.sh |
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 |
---|---|---|
|
@@ -13,6 +13,3 @@ lint: | |
|
||
test: | ||
tox | ||
|
||
release: clean-build | ||
poetry publish --build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
version=$(git describe --tags --abbrev=0) | ||
poetry version "${version}" | ||
poetry publish --build |