-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Slendi <slendi@socopon.com>
- Loading branch information
Showing
4 changed files
with
87 additions
and
14 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
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,57 @@ | ||
name: Build + Release Wheels Linux | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
deploy_to_testpypi: | ||
description: "Whether the build should be deployed to test.pypi.org instead of regular PyPI" | ||
required: true | ||
default: false | ||
|
||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
services: | ||
manylinux: | ||
image: quay.io/pypa/manylinux2010_x86_64:latest | ||
options: --user root | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build and Repair Wheels | ||
run: | | ||
# Install tools needed | ||
python -m pip install build | ||
python -m pip install auditwheel | ||
# Build sdist and wheel | ||
python -m build --sdist --wheel --outdir /github/workspace/dist/ | ||
# Repair the wheel | ||
sh -c 'auditwheel repair /github/workspace/dist/*.whl -w /github/workspace/dist/' | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install Twine | ||
run: pip install twine | ||
|
||
- name: Upload to PyPI | ||
if: github.event.inputs.deploy_to_testpypi == 'false' | ||
run: twine upload dist/* --verbose --skip-existing -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} | ||
env: | ||
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/ | ||
|
||
- name: Upload to TestPyPI | ||
if: github.event.inputs.deploy_to_testpypi == 'true' | ||
run: twine upload dist/* --verbose --skip-existing -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
env: | ||
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/ |
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
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