Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Publish to PyPI

on:
release:
types: [published]
workflow_run:
workflows: ["Release"]
types: [completed]
workflow_dispatch:
inputs:
tag:
Expand All @@ -14,7 +15,11 @@ jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
if: github.repository == '35C4n0r/langgraph-ephemeral-checkpointer'
if: |
github.repository == '35C4n0r/langgraph-ephemeral-checkpointer' && (
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
)
environment:
name: pypi
url: https://pypi.org/project/langgraph-ephemeral-checkpointer/
Expand All @@ -24,8 +29,17 @@ jobs:
contents: read

steps:
- name: Resolve tag
id: tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "value=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
else
echo "value=${{ github.event.workflow_run.head_branch }}" >> "$GITHUB_OUTPUT"
fi

- name: Download release assets
run: gh release download ${{ github.event.release.tag_name || inputs.tag }} --dir dist/ --repo ${{ github.repository }}
run: gh release download ${{ steps.tag.outputs.value }} --dir dist/ --repo ${{ github.repository }}
env:
GH_TOKEN: ${{ github.token }}

Expand Down