-
Notifications
You must be signed in to change notification settings - Fork 11
91 lines (66 loc) · 2.1 KB
/
publish.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Publish
on:
push:
tags:
- "*"
workflow_dispatch:
permissions:
contents: read
jobs:
build_wheels:
name: Build wheels
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 50
submodules: true
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install cibuildwheel
run: pip install cibuildwheel -qq
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*"
CIBW_SKIP: "pp* *-win_arm64 *-win32"
- uses: actions/upload-artifact@v3
with:
name: dist
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 50
submodules: true
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install Setuptools
run: python -m pip install --upgrade setuptools wheel pip cython
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist/*
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# I chose this repo's setup/workflow because it was the best Resource I could find for an implementation - Vizonex
# See: https://github.com/hoffstadt/DearPyGui/blob/master/.github/workflows/Deployment.yml#L165
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Publish package
uses: pypa/[email protected]
with:
verbose: true
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}