-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (53 loc) · 1.58 KB
/
Copy pathrelease.yml
File metadata and controls
65 lines (53 loc) · 1.58 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Publish Python 🐍 distribution 📦 to PyPI
on:
release:
types: [published]
permissions: {}
jobs:
build_wheels_and_sdist:
name: Build distribution wheels and sdist 📦
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install dependencies
run: pip install build
- name: Build wheels
run: python -m build
- uses: actions/upload-artifact@v7
with:
name: artifact
path: |
./dist/python_binexport*.whl
./dist/*.tar.gz
publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
needs: build_wheels_and_sdist
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/qbinary
permissions:
# Used for uploading the release notes.
contents: write
# Used to publish to PyPI with Trusted Publishing.
id-token: write
steps:
- uses: actions/download-artifact@v8
with:
# By omitting the name we are downloading all the artifacts
path: ./dist/
merge-multiple: true # Important to avoid subdirectories
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./dist/
attestations: true
- name: Upload Python packages for release notes
uses: softprops/action-gh-release@v2
with:
files: dist/*