Skip to content

PYPI Publish

PYPI Publish #168

Workflow file for this run

name: PYPI Publish
on:
workflow_run:
# Depend on the CI workflow
workflows: ["CI"]
pull_request:
push:
branches:
- "master"
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pytest-odoo
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install pypa/build
run: python -m pip install build
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1