Skip to content

Commit

Permalink
Fix the CD workflow file (#32)
Browse files Browse the repository at this point in the history
* Fix the CD workflow file

* Use our python prepare

* inc version
  • Loading branch information
kongzii authored Feb 22, 2024
1 parent ed4c87e commit d98346a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
30 changes: 2 additions & 28 deletions .github/workflows/python_cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ on:
release:
types: [ published ]

inputs:
BRANCH:
description: "Branch to publish from"
required: false
default: "main"
POETRY_VERSION:
description: "The version of Poetry to use"
required: false
default: "1.7.1"
POETRY_CORE_VERSION:
description: "The version of Poetry Core to use"
required: false
default: "1.8.1"
PUBLISH_REGISTRY:
description: "The registry to publish to"
required: false
default: "https://upload.pypi.org/legacy/"

jobs:
publish-pypi-package:
runs-on: ubuntu-latest
Expand All @@ -35,19 +17,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.BRANCH }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify the tag version in the pyproject.toml
run: grep -q "version = \"${{ github.event.release.tag_name }}\"" pyproject.toml || exit 1
shell: bash
- name: Install poetry
run: pip install poetry${{ inputs.POETRY_VERSION != '' && format('=={0}', inputs.POETRY_VERSION) || '' }} poetry-core${{ inputs.POETRY_CORE_VERSION != '' && format('=={0}', inputs.POETRY_CORE_VERSION) || '' }}
shell: bash
- name: Install dependencies
run: poetry install --no-root
shell: bash
- uses: ./.github/actions/python_prepare
- name: Build and Publish
run: |
poetry config repositories.publish ${{ inputs.PUBLISH_REGISTRY }}
poetry publish -p ${{ secrets.PYPI_TOKEN }} -u "__token__" -r publish --build
run: poetry publish -p ${{ secrets.PYPI_TOKEN }} -u "__token__" -r publish --build
shell: bash
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "prediction-market-agent-tooling"
version = "0.2.2"
version = "0.2.3"
description = "Tools to benchmark, deploy and monitor prediction market agents."
authors = ["Gnosis"]
readme = "README.md"
Expand Down

0 comments on commit d98346a

Please sign in to comment.