Skip to content

Commit

Permalink
First release published
Browse files Browse the repository at this point in the history
  • Loading branch information
earthai-tech committed Nov 9, 2024
1 parent d3e0c13 commit 8821f2c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
42 changes: 41 additions & 1 deletion .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Python Package using Conda

on: [push, pull_request]
on:
push:
tags:
- 'v*.*.*' # Trigger on version tags like v1.0.0
pull_request:

jobs:
build-linux:
Expand Down Expand Up @@ -52,6 +56,42 @@ jobs:
python -m pip install pytest pytest-xdist
pytest -n auto # Utilize all available CPU cores for testing
- name: Build Conda Package
run: |
conda install conda-build
conda build . # Build Conda package
- name: Publish to PyPI
if: github.ref_type == 'tag' # Only publish on tagged releases
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install --upgrade twine
twine upload dist/* # Upload package to PyPI
- name: Publish to Anaconda
if: github.ref_type == 'tag'
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
conda install anaconda-client
anaconda login --token $ANACONDA_TOKEN
anaconda upload path/to/your-package.tar.bz2 # Update with actual package path
- name: Clean up workspace
run: |
find . -name "*.so" -delete
find . -name "*.c" -delete
find . -name "*.cpp" -delete
- name: Upload pytest results
if: failure() # Executes only if previous steps fail
uses: actions/upload-artifact@v3
with:
name: pytest-results
path: ./.pytest_cache/

- name: Debugging Information
if: failure() # Executes only if previous steps fail
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
.pypirc

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function to ensure the model’s proper operation in various machine learning
workflows:

- **installation**:
This subpackage provides all the necessary instructions to :ref:` install <installation>` and
This subpackage provides all the necessary instructions to :ref:`install <installation>` and
configure the `hwm` package. It includes detailed steps for setting up
dependencies and environment requirements, ensuring users can get started
quickly and without hassle. It also includes troubleshooting tips for common
Expand Down

0 comments on commit 8821f2c

Please sign in to comment.