-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI/CD pipeline via GitHub Actions.
- Loading branch information
Showing
3 changed files
with
39 additions
and
2 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,35 @@ | ||
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.9' | ||
- name: Autoincrement version | ||
run: | | ||
# from refs/tags/v1.2.3 get 1.2.3 | ||
VERSION=$(echo $GITHUB_REF | sed 's#.*/##') | ||
PLACEHOLDER='__version__ = "develop"' | ||
VERSION_FILE='setup.py' | ||
# ensure the placeholder is there or abort if not found | ||
grep "$PLACEHOLDER" "$VERSION_FILE" | ||
sed -i "s/$PLACEHOLDER/__version__ = \"${VERSION}\"/g" "$VERSION_FILE" | ||
echo VERSION | ||
shell: bash | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: '__token__' | ||
TWINE_PASSWORD: ${{ secrets.PYPI_AUTH_TOKEN }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
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
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 |
---|---|---|
|
@@ -11,9 +11,11 @@ | |
|
||
from setuptools import setup, find_packages | ||
|
||
__version__ = "develop" | ||
|
||
setup( | ||
name="LAMP_core", | ||
version="1.0.4", | ||
version=__version__, | ||
description="LAMP Platform", | ||
author="Division of Digital Psychiatry at Beth Israel Deaconess Medical Center.", | ||
author_email="[email protected]", | ||
|