Skip to content

Build

Build #14

Workflow file for this run

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