forked from networkx/networkx
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.24 KB
/
release.yml
File metadata and controls
44 lines (38 loc) · 1.24 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
name: Build Wheel and Release
on:
push:
tags:
- networkx-*
jobs:
pypi-publish:
name: upload release to PyPI
if: github.repository_owner == 'networkx' && startsWith(github.ref, 'refs/tags/networkx-') && always()
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
attestations: write
contents: read
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
name: Install Python
with:
python-version: "3.11"
- name: Build wheels
run: |
git clean -fxd
pip install -U .[release]
python -m build --sdist --wheel
- name: Verify the distribution
run: twine check --strict dist/*
- name: Generate artifact attestation for sdist and wheel
uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0
with:
subject-path: "dist/networkx-*"
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1