-
-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (33 loc) · 922 Bytes
/
pythonpublish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Upload Python Package
on:
release:
types: [ created ]
workflow_dispatch:
inputs:
deploy_to_pypi:
type: boolean
description: Deploy the build to PyPI from this manual release.
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/fanoutqa
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
mkdir dist
- name: Build
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags') || inputs.deploy_to_pypi
uses: pypa/gh-action-pypi-publish@release/v1