Skip to content

v0.1.0

v0.1.0 #2

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [created]
concurrency:
group: ${{ github.workflow }}
jobs:
deploy:
name: Upload release to TestPyPI and PyPi
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mailtm-python
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -U build
- name: Build and package
run: python3 -m build --sdist --wheel --outdir dist/ .
- name: Publish 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}