Skip to content

Commit

Permalink
feat: bump version + release workflow + req bump
Browse files Browse the repository at this point in the history
  • Loading branch information
gus-opentensor committed Aug 23, 2024
1 parent 44653d5 commit d070739
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 7 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build and Publish Python Package

on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
type: string

jobs:
build:
name: Build Python distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel twine
- name: Build package
run: python setup.py sdist bdist_wheel

- name: Check if package version already exists
run: |
PACKAGE_NAME=$(python setup.py --name)
PACKAGE_VERSION=${{ github.event.inputs.version }}
if twine check dist/*; then
if pip install $PACKAGE_NAME==$PACKAGE_VERSION; then
echo "Error: Version $PACKAGE_VERSION of $PACKAGE_NAME already exists on PyPI"
exit 1
else
echo "Version $PACKAGE_VERSION of $PACKAGE_NAME does not exist on PyPI. Proceeding with upload."
fi
else
echo "Error: Twine check failed."
exit 1
fi
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/

approve-and-publish:
needs: build
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
id-token: write

steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: dist
path: dist/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
print-hash: true
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.7.2
6.7.3
2 changes: 1 addition & 1 deletion bittensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
nest_asyncio.apply()

# Bittensor code and protocol version.
__version__ = "6.7.2"
__version__ = "6.7.3"

version_split = __version__.split(".")
__version_as_int__ = (
Expand Down
6 changes: 3 additions & 3 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ pytest
retry
requests
rich
scalecodec==1.2.7
shtab==1.6.5
substrate-interface==1.7.5
scalecodec==1.2.11
shtab~=1.6.5
substrate-interface~=1.7.9
termcolor
torch>=1.13.1
tqdm
Expand Down
4 changes: 2 additions & 2 deletions scripts/environments/apple_m1_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ dependencies:
- retry==0.9.2
- rich==12.5.1
- rsa==4.9
- scalecodec==1.2.7
- scalecodec==1.2.11
- scikit-learn==1.2.2
- scipy==1.10.1
- sentencepiece==0.1.99
Expand All @@ -241,7 +241,7 @@ dependencies:
- sqlalchemy==2.0.19
- starlette==0.27.0
- streamlit==1.22.0
- substrate-interface==1.5.2
- substrate-interface==1.7.9
- tenacity==8.2.2
- termcolor==2.1.1
- threadpoolctl==3.1.0
Expand Down

0 comments on commit d070739

Please sign in to comment.