-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 938 Bytes
/
publish.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: Publish to PyPI
on:
workflow_dispatch:
# Optional inputs, you can add more according to your needs
inputs:
# version:
# description: 'Version of the package to release'
# required: true
# default: '1.0.0'
permissions:
contents: write
packages: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
# Add steps for any necessary setup, like installing dependencies
- name: Build
run: |
python -m pip install --upgrade pip
python -m pip install -U twine
python -m pip install -U wheel
python3 -m pip install build==1.0.3 # pin build
rm -rf ./build
rm -rf ./dist/*
python3 -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}