Skip to content

Merge pull request #16 from opalsecurity/andrewsy-pypi #1

Merge pull request #16 from opalsecurity/andrewsy-pypi

Merge pull request #16 from opalsecurity/andrewsy-pypi #1

name: Publish to PyPI
on:
push:
tags:
- 'v*'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build twine setuptools_scm
- name: Build the package
run: |
python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_ACCESS_TOKEN }}
run: |
python -m twine upload dist/* --skip-existing