-
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 969 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
name: Publish Python 🐍 distributions 📦 to PyPI
on:
push:
tags:
- 'v*'
branches:
- main
- stable
jobs:
publish:
name: "Build and upload to pypi"
runs-on: "ubuntu-latest"
# environment:
# name: pypi
# url: https://pypi.org/project/PyReprism/
# permissions:
# id-token: write
steps:
- uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatchling twine build hatch-vcs
- name: Build app
run: |
python -m build
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
# run: twine upload dist/*