Skip to content

Commit

Permalink
cicd: add build process
Browse files Browse the repository at this point in the history
  • Loading branch information
mmngreco committed Jan 18, 2022
1 parent 5d51dc9 commit 869ec02
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,22 @@ jobs:
run: make lint
- name: Test with pytest
run: make test
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup venv
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: actions/setup-python@v2
with:
python-version: "3.9"
run: make venv
- name: Build package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: make build
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
6 changes: 1 addition & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# file GENERATED by distutils, do NOT edit
setup.cfg
setup.py
ineqpy/__init__.py
ineqpy/ineqpy.py
include versioneer.py
include ineqpy/_version.py
include src/ineqpy/_version.py
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ doc:
.PHONY: vim
vim:
pipenv run nvim .

.PHONY: build
build:
pipenv run python setup.py sdist bdist_wheel
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description-file = README.rst
[versioneer]
VCS = git
style = pep440
versionfile_source = ineqpy/_version.py
versionfile_source = src/ineqpy/_version.py
versionfile_build = ineqpy/_version.py
tag_prefix = ineqpy-

0 comments on commit 869ec02

Please sign in to comment.