From 78a90312e6344d0ae619b9f63c82dc3e041ce88f Mon Sep 17 00:00:00 2001 From: Eric Gustin Date: Thu, 10 Apr 2025 14:31:09 -0700 Subject: [PATCH 1/8] Publish --- .github/workflows/publish-agents-arcade.yml | 26 ++++----------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/workflows/publish-agents-arcade.yml b/.github/workflows/publish-agents-arcade.yml index a3035dc..d308938 100644 --- a/.github/workflows/publish-agents-arcade.yml +++ b/.github/workflows/publish-agents-arcade.yml @@ -1,11 +1,9 @@ name: Publish openai-agents-arcade on: - workflow_dispatch: - inputs: - version: - description: "Version to release (leave empty to use version from pyproject.toml)" - required: false + pull_request: + branches: + - main jobs: test-and-publish: @@ -37,30 +35,14 @@ jobs: make sync make lint - - name: Set version if provided - if: inputs.version != '' - working-directory: . - run: | - uv bump ${{ inputs.version }} - - name: Publish to PyPI id: publish working-directory: . run: | uv build - export PYPI_TOKEN=${{ secrets.PYPI_TOKEN }} - # Extract version from pyproject.toml using uv and save it - VERSION=$(uv version --short) - echo "VERSION=$VERSION" >> $GITHUB_ENV - if uv publish --skip-existing 2>&1 | grep -q "File exists. Skipping"; then - echo "Version already exists on PyPI. Skipping publish." - echo "skip_publish=true" >> $GITHUB_OUTPUT - else - echo "skip_publish=false" >> $GITHUB_OUTPUT - fi + uv publish --token ${{ secrets.PYPI_TOKEN }} - name: Send status to Slack - if: steps.publish.outputs.skip_publish != 'true' uses: slackapi/slack-github-action@v2.0.0 with: webhook: ${{ secrets.PACKAGE_RELEASE_SLACK_WEBHOOK_URL }} From 042b54f71f247aa24af05bec8e85342be068dc35 Mon Sep 17 00:00:00 2001 From: Eric Gustin Date: Thu, 10 Apr 2025 14:39:26 -0700 Subject: [PATCH 2/8] Save version --- .github/workflows/publish-agents-arcade.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-agents-arcade.yml b/.github/workflows/publish-agents-arcade.yml index d308938..4e9cd4d 100644 --- a/.github/workflows/publish-agents-arcade.yml +++ b/.github/workflows/publish-agents-arcade.yml @@ -18,9 +18,6 @@ jobs: with: fetch-depth: 0 - - name: Install Poetry - uses: snok/install-poetry@v1 - - name: Install uv uses: astral-sh/setup-uv@v5 @@ -39,7 +36,9 @@ jobs: id: publish working-directory: . run: | - uv build + uv build | tee build.log + VERSION=$(grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' build.log | head -n1) + echo "VERSION=$VERSION" >> $GITHUB_ENV uv publish --token ${{ secrets.PYPI_TOKEN }} - name: Send status to Slack From 7f8affa8f2a5e83a8b05ddd37a05a8e81616bdf1 Mon Sep 17 00:00:00 2001 From: Eric Gustin Date: Thu, 10 Apr 2025 14:46:28 -0700 Subject: [PATCH 3/8] Always run slack trigger --- .github/workflows/publish-agents-arcade.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-agents-arcade.yml b/.github/workflows/publish-agents-arcade.yml index 4e9cd4d..7c2d638 100644 --- a/.github/workflows/publish-agents-arcade.yml +++ b/.github/workflows/publish-agents-arcade.yml @@ -39,9 +39,11 @@ jobs: uv build | tee build.log VERSION=$(grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' build.log | head -n1) echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "Publishing version $VERSION to PyPI" uv publish --token ${{ secrets.PYPI_TOKEN }} - name: Send status to Slack + if: always() uses: slackapi/slack-github-action@v2.0.0 with: webhook: ${{ secrets.PACKAGE_RELEASE_SLACK_WEBHOOK_URL }} From f5294d59c8829252089cd8a47e404ea72412327a Mon Sep 17 00:00:00 2001 From: Eric Gustin Date: Thu, 10 Apr 2025 14:48:42 -0700 Subject: [PATCH 4/8] update version env var setting --- .github/workflows/publish-agents-arcade.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-agents-arcade.yml b/.github/workflows/publish-agents-arcade.yml index 7c2d638..0a04020 100644 --- a/.github/workflows/publish-agents-arcade.yml +++ b/.github/workflows/publish-agents-arcade.yml @@ -37,7 +37,7 @@ jobs: working-directory: . run: | uv build | tee build.log - VERSION=$(grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' build.log | head -n1) + VERSION=$(grep -Eo 'v?[0-9]+\.[0-9]+\.[0-9]+' build.log | head -n1 | sed 's/^v//') echo "VERSION=$VERSION" >> $GITHUB_ENV echo "Publishing version $VERSION to PyPI" uv publish --token ${{ secrets.PYPI_TOKEN }} From dd949f4b4ab8b245ae9f126256644e6089882d25 Mon Sep 17 00:00:00 2001 From: Eric Gustin Date: Thu, 10 Apr 2025 14:50:39 -0700 Subject: [PATCH 5/8] update version env var setting --- .github/workflows/publish-agents-arcade.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-agents-arcade.yml b/.github/workflows/publish-agents-arcade.yml index 0a04020..4b5185f 100644 --- a/.github/workflows/publish-agents-arcade.yml +++ b/.github/workflows/publish-agents-arcade.yml @@ -37,7 +37,7 @@ jobs: working-directory: . run: | uv build | tee build.log - VERSION=$(grep -Eo 'v?[0-9]+\.[0-9]+\.[0-9]+' build.log | head -n1 | sed 's/^v//') + VERSION=$(grep -m 1 -Eo 'v?[0-9]+\.[0-9]+\.[0-9]+' build.log | sed 's/^v//') echo "VERSION=$VERSION" >> $GITHUB_ENV echo "Publishing version $VERSION to PyPI" uv publish --token ${{ secrets.PYPI_TOKEN }} From 304d88dc9ee6bc7be7aa7d0a511095fa084fe9cc Mon Sep 17 00:00:00 2001 From: Eric Gustin Date: Thu, 10 Apr 2025 14:54:38 -0700 Subject: [PATCH 6/8] Add back workflow dispatch --- .github/workflows/publish-agents-arcade.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-agents-arcade.yml b/.github/workflows/publish-agents-arcade.yml index 4b5185f..a104c7b 100644 --- a/.github/workflows/publish-agents-arcade.yml +++ b/.github/workflows/publish-agents-arcade.yml @@ -4,6 +4,7 @@ on: pull_request: branches: - main + workflow_dispatch: jobs: test-and-publish: From 979ec442db0409548f65b1395378aa6208eefb46 Mon Sep 17 00:00:00 2001 From: Eric Gustin Date: Thu, 10 Apr 2025 14:58:27 -0700 Subject: [PATCH 7/8] Write version --- .github/workflows/publish-agents-arcade.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-agents-arcade.yml b/.github/workflows/publish-agents-arcade.yml index a104c7b..e950ba7 100644 --- a/.github/workflows/publish-agents-arcade.yml +++ b/.github/workflows/publish-agents-arcade.yml @@ -33,14 +33,16 @@ jobs: make sync make lint + - name: Set version + run: | + VERSION=$(grep -m1 '^version' pyproject.toml | cut -d\" -f2) + echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Publish to PyPI id: publish working-directory: . run: | uv build | tee build.log - VERSION=$(grep -m 1 -Eo 'v?[0-9]+\.[0-9]+\.[0-9]+' build.log | sed 's/^v//') - echo "VERSION=$VERSION" >> $GITHUB_ENV - echo "Publishing version $VERSION to PyPI" uv publish --token ${{ secrets.PYPI_TOKEN }} - name: Send status to Slack From e490ea7dfee7cea9d7c6478a870ef48d6c7796e2 Mon Sep 17 00:00:00 2001 From: Eric Gustin Date: Thu, 10 Apr 2025 15:00:10 -0700 Subject: [PATCH 8/8] Ready --- .github/workflows/publish-agents-arcade.yml | 3 --- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/publish-agents-arcade.yml b/.github/workflows/publish-agents-arcade.yml index e950ba7..8a9ed8b 100644 --- a/.github/workflows/publish-agents-arcade.yml +++ b/.github/workflows/publish-agents-arcade.yml @@ -1,9 +1,6 @@ name: Publish openai-agents-arcade on: - pull_request: - branches: - - main workflow_dispatch: jobs: diff --git a/pyproject.toml b/pyproject.toml index 137337c..25bb260 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agents-arcade" -version = "0.0.3" +version = "0.0.4" description = "Arcade Integration for OpenAI Agents" readme = "README.md" requires-python = ">=3.9"