-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds publish-package.yml workflow to publish a new package (#8)
* Adds publish-package.yml workflow to publish a new package
- Loading branch information
Hirotaka Wakabayashi
authored
Dec 2, 2020
1 parent
d9ba53e
commit dbd0805
Showing
2 changed files
with
53 additions
and
12 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,53 @@ | ||
name: CI | ||
|
||
on: | ||
# Trigger the workflow on release, | ||
# but only when published | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
|
||
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]') && ! contains(toJSON(github.event.commits.*.message), '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.7'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
make init | ||
- name: Lint with flake8, mypy, pylint and checkdocs | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
make lint | ||
- name: Run tests | ||
run: | | ||
make test | ||
- name: Check coverage | ||
run: | | ||
make coverage | ||
- name: Make docs | ||
run: | | ||
make docs | ||
- name: Make dist package | ||
run: | | ||
make dist | ||
- name: Install the package locally | ||
run: | | ||
make install | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
if: github.event_name == 'release' | ||
run: | | ||
make release |
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