diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index be8f216..ba1c894 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,7 +31,6 @@ jobs: anaconda: runs-on: ubuntu-latest - needs: pypi steps: - uses: actions/checkout@v3 - name: Set up Python @@ -46,19 +45,23 @@ jobs: run: | sudo apt-get update && sudo apt-get install openssl curl conda install -y anaconda-client conda-build conda-verify + python -m pip install --upgrade pip + pip install setuptools wheel + pip install build --user + - name: Build package + run: >- + python -m build --sdist --wheel --outdir dist/ - name: Publish distribution to Anaconda env: ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} run: | - sleep 30m # wait for all the PyPi servers to be updated with the latest version of torch-hd - mkdir ./conda-build # create the artifact dir # Get the version of the library export TORCHHD_VERSION=$(python -c "with open('torchhd/version.py') as f: exec(f.read()); print(__version__)") - # Calculate the HASH of the PyPi package - curl -L --output ./conda-build/torchhd.tar.gz "https://pypi.io/packages/source/t/torch-hd/torch-hd-${TORCHHD_VERSION}.tar.gz" + # Calculate the HASH of the package + mv ./dist/torch_hd-${TORCHHD_VERSION}.tar.gz ./conda-build/torchhd.tar.gz export TORCHHD_HASH=$(openssl sha256 ./conda-build/torchhd.tar.gz | awk '{print $2}') # Build for noarch platform diff --git a/torchhd/version.py b/torchhd/version.py index 36f0a8a..1960a91 100644 --- a/torchhd/version.py +++ b/torchhd/version.py @@ -21,4 +21,4 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -__version__ = "5.6.1" +__version__ = "5.6.2"