-
-
Notifications
You must be signed in to change notification settings - Fork 12
75 lines (58 loc) · 1.95 KB
/
BuildPackage.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
name: Build
on:
workflow_dispatch:
inputs:
version:
description: 'Dear PyGui Extension Version'
required: true
default: '2.0.0'
deploy:
description: 'Deploy (true will deploy to pypi)'
required: true
default: 'false'
deploytest:
description: 'Deploy (true will deploy to test pypi)'
required: true
default: 'false'
jobs:
build-package:
runs-on: windows-2019
strategy:
matrix:
python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build dearpygui
- name: Build package
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
echo ${{ github.event.inputs.version }} > version_number.txt
python -m build
- uses: actions/upload-artifact@v4
with:
name: dearpygui_ext wheel
path: |
${{ github.workspace }}/version_number.txt
${{ github.workspace }}/dist/*.whl
${{ github.workspace }}/dist/*.tar.gz
retention-days: 1
if-no-files-found: error
- name: PyPi Deployment
shell: cmd
if: ${{contains(github.event.inputs.deploy, 'true') && github.ref == 'refs/heads/master'}}
run: |
python -m pip install twine
python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --skip-existing
- name: Test PyPi Deployment
shell: cmd
if: ${{contains(github.event.inputs.deploytest, 'true') && github.ref == 'refs/heads/master'}}
run: |
python -m pip install twine
python -m twine upload --repository testpypi dist/* -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} --skip-existing