Skip to content

Commit

Permalink
add version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Tburm committed Oct 12, 2023
1 parent 6085cf2 commit ef952ec
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[bumpversion]
current_version = 0.1.0
commit = True
tag = True

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
60 changes: 60 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: PyPi Publish

on:
push:
branches:
- v3-competition
pull_request:
branches:
- v3-competition

jobs:
build-and-install:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install ./src
deploy:
needs: build-and-install
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install twine
- name: Bump version
id: bump_version
run: |
bump2version patch --config-file .bumpversion.cfg
echo "::set-output name=new_version::$(cat .bumpversion.cfg | grep current_version | sed 's/^current_version = //')"
- name: Build and publish
run: |
python ./src/setup.py sdist bdist_wheel
twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pytest
sphinx
sphinx-rtd-theme
myst-parser
bump2version
2 changes: 1 addition & 1 deletion src/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
setup(
name='synthetix',
version='1.0.0',
version='0.1.0',
description='Synthetix protocol SDK',
long_description='A library containing helpful functions for interacting with the Synthetix protocol',
author='Synthetix DAO',
Expand Down

0 comments on commit ef952ec

Please sign in to comment.