-
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.
- Loading branch information
1 parent
7a7b1ba
commit f6814bf
Showing
2 changed files
with
22 additions
and
8 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ on: | |
release: | ||
types: | ||
- published | ||
workflow_dispatch: | ||
|
||
name: PyPI Publish | ||
|
||
|
@@ -11,7 +12,6 @@ jobs: | |
strategy: | ||
matrix: | ||
python-version: [3.9] | ||
needs: integration | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -44,8 +44,17 @@ jobs: | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
|
||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
python_version: ${{ matrix.python-version }} | ||
- name: Run pre-commit on all files | ||
run: | | ||
poetry run pre-commit run --all-files | ||
- name: Run tests | ||
run: | | ||
poetry run pytest | ||
- name: Publish to PyPI | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
poetry config pypi-token.pypi $PYPI_TOKEN | ||
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