Skip to content

Fix on clause in build_and_publish.yml #76

Fix on clause in build_and_publish.yml

Fix on clause in build_and_publish.yml #76

name: Publish Python 🐍 distributions 📦
on:
push:
tags:
- 'v*'
jobs:
build-and-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Change version
run: |
VERSION=${{ github.ref_name }}
sed -i -e "s/__version__ = '1.0.0'/__version__ = '${VERSION:1}'/g" ${{ github.workspace }}/auth_lib/__init__.py
- name: Install dependencies
run: |
python -m ensurepip
pip install build --user
python -m build --wheel --sdist --outdir dist/
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}