-
Notifications
You must be signed in to change notification settings - Fork 117
34 lines (30 loc) · 1.04 KB
/
release.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
name: Release to PyPI
on:
release:
types: [published]
permissions:
contents: read
jobs:
build-and-pubish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
ref: ${{ github.event.release.tag_name }}
- name: Install Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
- name: Install build dependencies
run: python -m pip install -U setuptools build wheel
- name: Build distributions
run: python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@916e57631f04a497e4bec0e29e80684e45b4305e # main
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}