Skip to content

v2.7.0

v2.7.0 #39

name: Release permit python SDK
on:
release:
types: [published]
env:
PROJECT_ID: 7f55831d77c642739bc17733ab0af138 #github actions project id (under 'Permit.io Tests' workspace)
ENV_NAME: python-sdk-ci
jobs:
publish_python_sdk:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/permit
permissions:
id-token: write
contents: write # 'write' access to repository contents
pull-requests: write # 'write' access to pull requests
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Python setup
uses: actions/setup-python@v5
with:
python-version: '3.11.8'
- name: Bump version and commit changes
run: |
sed -i "s/version=\"[0-9.]*\"/version=\"${{ github.event.release.tag_name }}\"/" setup.py
- name: Build Python package
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}