-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.03 KB
/
workflow.yml
File metadata and controls
37 lines (35 loc) · 1.03 KB
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
name: Publish to PyPI
on:
# push:
# branches:
# - master
workflow_dispatch:
# This creates a "Run workflow" button on the github repo webpage when the "Publish to PyPi"
# workflow is selected on the "Actions" tab. But only if this workflow is in
# the branch which is selected on github as the "default branch".
inputs:
target:
description: 'Target branch to run'
required: true
jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build
- name: Build Python
run: python -m build
- name: Build and publish
uses: pypa/gh-action-pypi-publish@release/v1