42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
name: Supervision Test Releases to PyPi
|
|
on:
|
|
push:
|
|
tags:
|
|
- '[0-9]+.[0-9]+[0-9]+.[0-9]+a[0-9]'
|
|
- '[0-9]+.[0-9]+[0-9]+.[0-9]+b[0-9]'
|
|
- '[0-9]+.[0-9]+[0-9]+.[0-9]+rc[0-9]'
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-n-publish:
|
|
name: Build and publish to PyPI
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 🐍 Set up Python 3.8 environment for build
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.8"
|
|
|
|
- name: 🏗️ Build source and wheel distributions
|
|
run: |
|
|
python -m pip install --upgrade build twine
|
|
python -m build
|
|
twine check --strict dist/*
|
|
- name: 🚀 Publish distribution to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
user: ${{ secrets.PYPI_USERNAME }}
|
|
password: ${{ secrets.PYPI_PASSWORD }}
|
|
- name: 🚀 Publish to Test-PyPi
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
repository-url: https://test.pypi.org/legacy/
|
|
user: ${{ secrets.PYPI_TEST_USERNAME }}
|
|
password: ${{ secrets.PYPI_TEST_PASSWORD }}
|