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
20 changes: 9 additions & 11 deletions .github/workflows/auto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,18 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "release_tag=v$VERSION" >> $GITHUB_OUTPUT

- name: Get changed files
id: files
uses: jitterbit/get-changed-files@v1

- name: Check for version.py diff
id: diff
env:
BASE_SHA: ${{ github.event.before }}
HEAD_SHA: ${{ github.sha }}
run: |
FOUND=0
for changed_file in ${{ steps.files.outputs.all }}; do
if [[ $changed_file == "stytch/version.py" ]]; then
FOUND=1
fi
done
echo "diff=$FOUND" >> $GITHUB_OUTPUT
git fetch --depth=1 origin "$BASE_SHA"
if git diff --quiet "$BASE_SHA" "$HEAD_SHA" -- stytch/version.py; then
echo "diff=0" >> $GITHUB_OUTPUT
else
echo "diff=1" >> $GITHUB_OUTPUT
fi

- name: Publish distribution to PyPI
env:
Expand Down
Loading