File tree 1 file changed +45
-1
lines changed
1 file changed +45
-1
lines changed Original file line number Diff line number Diff line change 8
8
- ' *'
9
9
10
10
jobs :
11
- build :
11
+ build-on-windows :
12
12
name : Build distribution 📦
13
13
runs-on : windows-latest
14
14
51
51
name : python-package-distributions
52
52
path : dist/
53
53
54
+ build-on-linux :
55
+ name : Build distribution 📦
56
+ runs-on : ubuntu-latest
57
+
58
+ steps :
59
+ - uses : actions/checkout@v4
60
+ - name : Set up Python
61
+ uses : actions/setup-python@v4
62
+ with :
63
+ python-version : " 3.x"
64
+ - name : Install pypa/build
65
+ run : |
66
+ python -m pip install --upgrade pip
67
+ pip install setuptools wheel twine build
68
+ - name : Build a binary wheel and a source tarball
69
+ run : python3 -m build --wheel
70
+ - name : Rename the distribution files
71
+ run : |
72
+ # Navigate to the dist directory
73
+ cd dist
74
+
75
+ # Loop over every .whl file
76
+ for oldname in *.whl
77
+ do
78
+ # Split the filename by "-"
79
+ IFS='-' read -ra nameParts <<< "$oldname"
80
+
81
+ # Replace the third and fourth items by "py3"
82
+ nameParts[2]="py3"
83
+ nameParts[3]="py3"
84
+ nameParts[4]="manylinux1"
85
+
86
+ # Assemble the new filename
87
+ newName=$(IFS='-'; echo "${nameParts[*]}")
88
+
89
+ # Move the old file to the new filename
90
+ mv "$oldname" "$newName"
91
+ done
92
+
93
+ - name : Store the distribution packages
94
+ uses : actions/upload-artifact@v3
95
+ with :
96
+ name : python-package-distributions
97
+ path : dist/
54
98
github-release :
55
99
name : >-
56
100
Sign the Python 🐍 distribution 📦 with Sigstore
You can’t perform that action at this time.
0 commit comments