diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index a4c2070..505209a 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: permissions: - contents: read + contents: write id-token: write # required for PyPI trusted publishing (OIDC) jobs: @@ -47,6 +47,7 @@ jobs: print('true' if Version('${LOCAL}') > Version('${REMOTE}') else 'false') ") echo "publish=${SHOULD_PUBLISH}" >> "$GITHUB_OUTPUT" + echo "version=${LOCAL}" >> "$GITHUB_OUTPUT" - name: Install, lint, test, build if: steps.version.outputs.publish == 'true' @@ -62,3 +63,9 @@ jobs: if: steps.version.outputs.publish == 'true' uses: pypa/gh-action-pypi-publish@release/v1 # Uses OIDC trusted publishing — no API token needed + + - name: Tag release + if: steps.version.outputs.publish == 'true' + run: | + git tag "v${{ steps.version.outputs.version }}" + git push origin "v${{ steps.version.outputs.version }}" diff --git a/pyproject.toml b/pyproject.toml index 8bcb5df..9f0d28c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "decibel-python-sdk" -version = "0.1.2" +version = "0.2.0" description = "Python SDK for interacting with Decibel, a fully on-chain trading engine built on Aptos." readme = "README.md" license = "MIT" diff --git a/uv.lock b/uv.lock index b402fb9..f52663f 100644 --- a/uv.lock +++ b/uv.lock @@ -489,7 +489,7 @@ wheels = [ [[package]] name = "decibel-python-sdk" -version = "0.1.2" +version = "0.2.0" source = { editable = "." } dependencies = [ { name = "aptos-sdk" },