All checks were successful
Deploy Tools / build-package (push) Successful in 21s
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Deploy Tools
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build-package:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python3 -m pip install --upgrade pip setuptools wheel build
|
|
|
|
- name: Build package
|
|
run: |
|
|
cd $GITHUB_WORKSPACE
|
|
echo [build-system] >> pyproject.toml
|
|
echo 'requires = ["setuptools", "wheel"]' >> pyproject.toml
|
|
echo 'build-backend = "setuptools.build_meta"' >> pyproject.toml
|
|
python3 -m build
|
|
|
|
- name: PyPi Deployment
|
|
if: ${{contains(github.event.head_commit.message, '[pypi]')}}
|
|
run: |
|
|
python3 -m pip install twine
|
|
python3 -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --skip-existing
|
|
|
|
- name: Test PyPi Deployment
|
|
if: ${{contains(github.event.head_commit.message, '[testpypi]')}}
|
|
run: |
|
|
python3 -m pip install twine
|
|
python3 -m twine upload --repository testpypi dist/* -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} --skip-existing |