-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload Test PyPI Workflow For Testing
Should be used for anything other than going to PYPI itself , this will save us some version numbers in the long run.
- Loading branch information
Showing
1 changed file
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Test Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
# Make sure it can be uploaded when a PR is requested - Vizonex | ||
pull_request: | ||
tags: | ||
- "*" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- 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: "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 | ||
|
||
- 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: windows-2019 | ||
|
||
# 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: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel twine | ||
- name: Test PyPi Deployment | ||
shell: cmd | ||
run: | | ||
python -m twine upload --repository testpypi dist/* -u __token__ -p ${{ secrets.PYPI_PASSWORD }} --skip-existing | ||