-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from pyserial/feat-github-actions
chore(CI): add github actions for easier releasing
- Loading branch information
Showing
6 changed files
with
106 additions
and
5 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,31 @@ | ||
# create wheel file | ||
|
||
name: build Python package | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
name: Build Wheel | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install build dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
- name: Build package | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: | | ||
dist/*.whl | ||
dist/*.tar.gz |
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,36 @@ | ||
# upload source and wheel from build action | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: | | ||
dist/*.whl | ||
dist/*.tar.gz | ||
- name: Publish to PyPi | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
twine upload dist/* |
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,16 @@ | ||
==================== | ||
Notes for developers | ||
==================== | ||
|
||
Creating a release | ||
================== | ||
|
||
- Ensure that the ``version`` in ``serial_asyncio/__init__.py`` is updated | ||
and in the form of major.minor[.patchlevel] | ||
- Ensure all changes, including version, is committed then create a tag with | ||
the exact same value as the version (e.g. "0.5") | ||
- Push to GitHub, merge into master if it is a branch. The GitHub Actions | ||
are set-up to build the default branch. | ||
- Inspect the built wheel and tar.gz files for correctness, test. | ||
- Trigger the upload to PyPi by using GitHub web interface "Releases" and | ||
create a new release from the tag. |
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