Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/auto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,54 @@

jobs:
build-and-publish:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-public
name: Build and publish stytch package to PyPI
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.14"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt

- name: Build distributions
run: python -m build

- name: Get version
id: version
run: |
VERSION=$(python -c 'import stytch; print(stytch.__version__)')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "release_tag=v$VERSION" >> $GITHUB_OUTPUT

- name: Check for version.py diff
id: diff
env:
BASE_SHA: ${{ github.event.before }}
HEAD_SHA: ${{ github.sha }}
run: |
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:
api_token: ${{ secrets.PYPI_API_TOKEN }}
if: steps.diff.outputs.diff != 0 && env.api_token != ''
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Create release
if: steps.diff.outputs.diff != 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${{ steps.version.outputs.release_tag }}" --generate-notes

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 1 addition & 1 deletion .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@

jobs:
check-links:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-public
name: Check links in README.md
steps:
- uses: actions/checkout@v3

- name: Get links
run: |
grep -Eo "\[[^][]+]\((https?://stytch.com[^()]+)\)" README.md | grep -Eo "https:[^)]*" | sort -u > links.txt
found_bad=0
for link in $(cat links.txt); do
status_code=$(curl -s -o /dev/null -w "%{http_code}" $link)
if [[ "$status_code" != "200" ]]; then
echo "$link -> $status_code"
found_bad=1
fi
done
if [[ $found_bad == 1 ]]; then
exit 1
fi

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@

jobs:
test-stytch:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-public

strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

name: "Run tests for python ${{ matrix.python-version }}"
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt

- name: Check types and run linter
run: make lint

- name: Run unit tests
run: make test

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Loading