Skip to content

Commit 4309f55

Browse files
committed
update github workflows
1 parent a422e89 commit 4309f55

File tree

4 files changed

+21
-24
lines changed

4 files changed

+21
-24
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
# (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
4343
run: |
4444
source actions-ci/install.sh
45-
- name: Pip install pylint, Sphinx, pre-commit
45+
- name: Pip install Sphinx, pre-commit
4646
run: |
47-
pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit
47+
pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit
4848
- name: Library version
4949
run: git describe --dirty --always --tags
5050
- name: Setup problem matchers
@@ -59,22 +59,19 @@ jobs:
5959
with:
6060
name: bundles
6161
path: ${{ github.workspace }}/bundles/
62-
- name: Check For docs folder
63-
id: need-docs
64-
run: |
65-
echo ::set-output name=docs::$( find . -wholename './docs' )
6662
- name: Build docs
67-
if: contains(steps.need-docs.outputs.docs, 'docs')
6863
working-directory: docs
6964
run: sphinx-build -E -W -b html . _build/html
70-
- name: Check For setup.py
65+
- name: Check For pyproject.toml
7166
id: need-pypi
7267
run: |
73-
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
68+
echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
7469
- name: Build Python package
75-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
70+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
7671
run: |
77-
pip install --upgrade setuptools wheel twine readme_renderer testresources
78-
python setup.py sdist
79-
python setup.py bdist_wheel --universal
72+
pip install --upgrade build twine
73+
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
74+
sed -i -e "s/0.0.0+auto.0/1.2.3/" $file;
75+
done;
76+
python -m build
8077
twine check dist/*

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,28 @@ jobs:
6161
runs-on: ubuntu-latest
6262
steps:
6363
- uses: actions/checkout@v1
64-
- name: Check For setup.py
64+
- name: Check For pyproject.toml
6565
id: need-pypi
6666
run: |
67-
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
67+
echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
6868
- name: Set up Python
69-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
69+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
7070
uses: actions/setup-python@v2
7171
with:
7272
python-version: '3.x'
7373
- name: Install dependencies
74-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
74+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
7575
run: |
7676
python -m pip install --upgrade pip
77-
pip install setuptools wheel twine
77+
pip install --upgrade build twine
7878
- name: Build and publish
79-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
79+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
8080
env:
8181
TWINE_USERNAME: ${{ secrets.pypi_username }}
8282
TWINE_PASSWORD: ${{ secrets.pypi_password }}
8383
run: |
84-
for file in $(find -not -path "./.*" -not -path "./docs*" -name "*.py"); do
85-
sed -i -e "s/0.0.0-auto.0/${{github.event.release.tag_name}}/" $file;
84+
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
85+
sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file;
8686
done;
87-
python setup.py sdist
87+
python -m build
8888
twine upload dist/*

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
# SPDX-License-Identifier: MIT
55

66
Adafruit-Blinka
7-
adafruit-circuitpython-binascii
7+
# adafruit-circuitpython-binascii
88
adafruit-circuitpython-logging

websockets/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# imports
2121

22-
__version__ = "0.0.0-auto.0"
22+
__version__ = "0.0.0+auto.0"
2323
__repo__ = "https://github.com/Neradoc/CircuitPython_websockets.git"
2424

2525
from .socket import UniversalSocket

0 commit comments

Comments
 (0)