forked from shankarpandala/lazypredict
-
Notifications
You must be signed in to change notification settings - Fork 0
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 shankarpandala#471 from shankarpandala/dev
changed way of releasing package
- Loading branch information
Showing
2 changed files
with
24 additions
and
17 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 |
---|---|---|
@@ -1,29 +1,49 @@ | ||
# This workflow will upload a python package uing twine when a release is triggered | ||
|
||
name: publish | ||
|
||
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: Get release version | ||
id: get_version | ||
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}" | ||
|
||
- name: Update version in setup.py | ||
run: | | ||
sed -i "s/version='.*'/version='${{ steps.get_version.outputs.version }}'/g" setup.py | ||
sed -i "s/__version__ = '.*'/__version__ = '${{ steps.get_version.outputs.version }}'/g" lazypredict/__init__.py | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
- name: Build and publish to PyPI | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERS }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
- name: Build Conda Package | ||
run: | | ||
conda install conda-build | ||
conda-build conda-recipe | ||
- name: Upload Conda Package | ||
run: | | ||
anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_TOKEN }} | ||
anaconda upload /path/to/your/conda-package.tar.bz2 # Update with actual path |
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