-
-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (33 loc) · 943 Bytes
/
pypi_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
35
36
37
38
39
40
41
name: Publish to PyPI
on:
release:
types: [published]
jobs:
build:
name: Build dist & publish
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/flake8-annotations
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/0.4.30/install.sh | sh
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Build package
run: uvx --from build pyproject-build --installer uv
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.10
with:
print-hash: true
- name: Upload wheel to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gh release upload ${{ github.event.release.tag_name }} ./dist/flake8_annotations-*.whl