-
Notifications
You must be signed in to change notification settings - Fork 43
39 lines (33 loc) · 972 Bytes
/
deploy.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
# Note: Do not rename workflow name `deploy.ymal` as its used by trusted plublisher.
name: 🐍 Publish to PyPI
on:
push:
branches:
- main
tags:
- '*'
jobs:
build-and-publish:
name: Build and publish Python 🐍 distributions to PyPI
if: startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/widgetastic.core
permissions:
id-token: write # This permission is mandatory for trusted publishing
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Build Package and Check
run: |
pip install -U wheel twine
pip wheel --no-deps -w dist .
twine check dist/*
- name: Deploy to PyPi
uses: pypa/gh-action-pypi-publish@release/v1