Skip to content

Commit

Permalink
Update Conda publish workflow and increment version
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeheddes committed Sep 1, 2024
1 parent d346cea commit aae9537
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:

anaconda:
runs-on: ubuntu-latest
needs: pypi
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion torchhd/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit aae9537

Please sign in to comment.