-
Notifications
You must be signed in to change notification settings - Fork 23
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
Showing
1 changed file
with
11 additions
and
19 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 |
---|---|---|
|
@@ -15,14 +15,13 @@ jobs: | |
name: Code QA | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: pip install black flake8 isort | ||
- run: black --version | ||
- run: isort --version | ||
- run: flake8 --version | ||
- run: isort --check . | ||
- run: black --check . | ||
- run: flake8 . | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/[email protected] | ||
env: | ||
SKIP: no-commit-to-branch | ||
|
||
checks: | ||
if: ${{ github.event_name == 'release' }} | ||
|
@@ -66,24 +65,17 @@ jobs: | |
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Check that tag version matches code version | ||
run: | | ||
tag=${GITHUB_REF#refs/tags/} | ||
version=$(python setup.py --version) | ||
echo 'tag='$tag | ||
echo "version file="$version | ||
test "$tag" == "$version" | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
pip install build wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
python setup.py sdist | ||
python -m pip install --upgrade build | ||
python -m build | ||
twine upload dist/* |